Course Content
Expert React
4. Formik
Powerful Form Library for ReactGet Started with FormikCustom Formik HookInvolve Formik into React componentAdd Initial ValuesForm SubmissionForm ValidationChallenge OverviewChallenge: useFormik HookChallenge: Binding Formik with React ComponentChallenge: Add Initial ValuesChallenge: Form SubmissionChallenge: ValidationFormik Section Sum Up
6. Next Steps
Expert React
Challenge: Add Initial Values
Task
Initialize values for the input fields. Each input field should be assigned an initial value based on the value of the name
prop. Follow the steps below:
Follow the steps:
- Initialize the
firstName
field with an empty string. - Initialize the
lastName
field with an empty string. - Initialize the
mail
field with an empty string.
Hint
1. To set the initial value for the input field responsible for the user's
first name, use the
2. To set the initial value for the input field responsible for the user's last name, use the
3. To set the initial value for the input field responsible for the user's email, use the
firstName
value. 2. To set the initial value for the input field responsible for the user's last name, use the
lastName
value. 3. To set the initial value for the input field responsible for the user's email, use the
mail
value.
Everything was clear?
Section 4. Chapter 11