I keep getting a educationData.map is not a function error after I submit my form with or without filling out the the form. I would like to pass my form data (genData,edData,paData) to my Results component. Any help in solving this?
Initially educationData is Array and you have used map method to generate input fields .
The error is caused by the handleSubmit function.
when submit button is clicked educationData is no more an Array but on Object hence educationData.map is not a function
So, I changed my setEdData and setPaData to be an array in my handleSubmit function but I’m not sure how to get my results to display in my results component. Right now I’m only seeing the genData in the results when I console.log.