Great question! 😊
The reason is to reduce our app re-renced cycles on state changes. Usually, states that describe inputs are updated when onChange event occurs that causes the whole component re-rendering on each small change (e.g. key press).
To get quicker answers you can ask in questions section on dirask.com/questions because I don't read the comments here every day 😊
Absolutely. Component rerender becomes always a concern. I mostly use event.target.elements.inputname.value to get values from the form onSubmit. This is also good though.
Thanks for sharing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great question! 😊
The reason is to reduce our app re-renced cycles on state changes. Usually, states that describe inputs are updated when onChange event occurs that causes the whole component re-rendering on each small change (e.g. key press).
To get quicker answers you can ask in questions section on dirask.com/questions because I don't read the comments here every day 😊
Absolutely. Component rerender becomes always a concern. I mostly use
event.target.elements.inputname.value
to get values from the form onSubmit. This is also good though.Thanks for sharing.