3 ms·
Having it in state allows you to react to changes in the form fields for validation, i.e. username availability, password strength, email validity, field charac
by nathan815 7y ago
Having it in state allows you to react to changes in the form fields for validation, i.e. username availability, password strength, email validity, field character length (think twitter), etc.
Of course you can do this imperatively by manually querying the DOM and getting the input values, but I think it's nice to have the form data in the state to work with and have full control over it.