I build a simple project to explain my problem
here the full code
https://codesandbox.io/s/check-it-4d2g1?file=/src/App.tsx:585-598
I want to pass initialValues from App component to Step1 component and after that show the firstName in Step2 component
here my initialValues in useFormik hooks
const formik = useFormik({ initialValues: { firstName: "", lastName: "" } });
This is step 1
here the user fill the firstName input
here the firstName field
This is step 2
So how can I displat firstName at Step2 ?
How I try is the right way?
I know there is 3 way for that
1.Passing a component to the component prop of Formik
2.Using the render method and passing your forms markup in JSX
3.Wrap your form with Formik and add your form as JSX
What is the fit way can you fill my codesandbox example according this way...?
https://codesandbox.io/s/check-it-4d2g1?file=/src/App.tsx:585-598
I found solution for that
full code here:
https://codesandbox.io/s/check-it-forked-mp3ux