Why isn't input synced with state in React?
问题 I'm making a form generator that uses a JSON schema to build a form and I've ran into an issue. If I make a controlled input and I call getForms method (method that generates the form) on each render it updates the value of input from state as expected. Great. But, I don't want the algorithm that generates the form from JSON schema to be called on every render. I tried storing the form in a class variable or in a state but it didn't work as expected. When the input is changed the state is