News for hackers. Stuff that matters.
Re:React as a UI Runtime by bgdam on Sunday February 03, 2019 @03:20AM (#19068422)
I think this is because you are using both state and props to manage the values of fields. I generally tend to use only props, with an onChange handler passed in from the parent component. This way, I can always have an up to date mapping of field names to values in the parent component, while simplifying state management in the child.
Re:React as a UI Runtime by fiddlerwoaroof on Sunday February 03, 2019 @06:41AM (#19069074)
This is exactly what I’m saying: use only props and handle state elsewhere.