DEV Community


Discussion on: Create simple login form in React

diraskreact profile image
Dirask-React Author

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 because I don't read the comments here every day 😊

ms_yogii profile image
Yogini Bende

Absolutely. Component rerender becomes always a concern. I mostly use to get values from the form onSubmit. This is also good though.

Thanks for sharing.

Forem Open with the Forem app