DEV Community

Discussion on: React & Formik Build forms more efficiently

przpiw profile image
Damian Piwowarczyk Author

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 ->
I hope that answered your question :)