I need help from someone who is familiar with Formik.
I want to build a series of checkboxes depending on what a user selects in a dropdown. Then I want to send all that info (drop down choice, checkboxes selected) over, when form is submitted.
But I don’t know how to separate the functions that build the checkboxes and the JSX tags that need to be supplied to Formik API. I know I don’t want state to be tracked outside of Formik but I’m just lost as to how to do that??
This is the code; it’s a little rough b/c I am converting old code (that uses useState() with new code in which Formik tracks all state): https://github.com/SabahatPK/recipe-project-mobile/blob/master/screens/BuildPantry.js
And this is the output: https://expo.io/@sabbygirl99/recipe-project-mobile (have to view via Expo app)
Would really appreciate someone’s help that knows Formik!