Open micahchiang opened 2 years ago
Potentially revisit when stubbing tickets from #504. With prefill & SiP, we need a way of hooking into the redux store for returned data from vets-api to use for initialValues. We also need a way to update the redux store with any new form information that should be saved on page progression or exiting the form for finishing later. We may be able to just take formik values and sync them into redux.
Description
Original intention of this ticket: Add a way for users to hook into Redux and read data in or out, as needed. TICKET NEEDS UPDATING TO REFLECT THE ORIGINAL INTENTION
Form applications are built using a light formik wrapper. One of the benefits of this is that formik provides its own react context, managing form state and making data accessible throughout the component tree. Ideally, users would be able to extract their form data from their form app, and use it how they wish.
Currently a user would import
FormRouter
and build their application with route composition:With this, one possibility could be to pass a stateHandler into
FormRouter
and invoke it when formik form values are updated:Tasks
Acceptance Criteria