We’ll take advantage of the controlled nature of the todo input and the first class nature of javascript functions to dynamically assign the form submission handler. An empty todo will trigger a submission handler that is only concerned with handling an error state, and when the input is valid, the form will use the standard submit handler.
My Chrome React devtools do not show "bound" and then the function that is bounded they only show "fn"
Have you tried pulling down the repository code to see if it works from the source?
Thank you Andy, const submitHandler make sense for me to create UX validation. How about handle multiple input? and show error message when one or all input is empty or wrong format. Do you any idea for that case?
Thank you
Why isn't form validation handled in the form ?