So let's say I have four components, three children and one parent.
parentObject = {}
childOneObject = {starTime, endTime}
childTwoObject = {color, theme, junk}
childThreeObject = {starsInSky, wheelsOnCar, shoesOnFeet}
The parentObject should be made up of all these values to submit in the end.
At the end of the first component, a user will submit their data and it will get added to the parentObject. Which looks like this
parentObject = childOneObject
The user will continue on to step two and submit their info which works the same as step one, but if I write parentObject = childTwoObject
The original data is obviously destroyed. I'd like to know if there is a way to insert chunks of data into objects without destroying older data or having to target things line by line like
parentObject.startTime = 5:00
I do not like to have to do this because it's cumbersome to me.