'How to use React useContext with Formik FieldArray in multistep dynamic form?
I have been coding for 4 months, this is my first post and my first time using SandBox, feel free to roast me... I am trying to make a complicated multistep, dynamic form where users can input information about cars. I am trying to use the React hook useContext because I figured it was the best way to pass around the data. I am also trying to make part of the form dynamic using Formik FieldArray, where a user could input multiple past owners of the car. This is where I am stuck. Specifically on the "Previous Owner" section when trying to use FieldArray. The data gets set with useContext, but it freaks out when trying to add more than one previous owner. I think it's because it's not identifying each previous owner as an additional object. The TextField also loses focus after each character input. I created a SandBox in order to see it visually plus the code. I also added the JSON values as it kinda helped me see whats going on. Sandbox Link Any help would be greatly appreciated! Thank you very much for your time and help!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
