useFormik it is a custom hook that returns state and helper methods.
We reuse the same exact change handler function handleChange for each HTML input
We pass an id and name HTML attribute that matches the property we defined in initialValues
We access the field’s value using the same name (email -> formik.values.email)
I hope that answered your question :)
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.
Btw , how does formik remembers change events w.r.t to form object? Does it based on html element id or name ?
useFormik it is a custom hook that returns state and helper methods.
We reuse the same exact change handler function handleChange for each HTML input
We pass an id and name HTML attribute that matches the property we defined in initialValues
We access the field’s value using the same name (email -> formik.values.email)
I hope that answered your question :)