I am trying to add the value (an object{}) in the array[] which is the part or property of the object in an another array in Reactjs using functional components and using hooks!
here part of example code:
const arrayState = {
array: [
{ id: 1, name: "", Insidarray: []},
{ id: 1, name: "", Insidarray: []}
]
}
I want to add the values (object like {name: "", anotherarray: []}
) in the array named Insidarray
shown above in Reactjs using useReducer, useContext, useState hooks.
question from:
https://stackoverflow.com/questions/65599760/access-and-add-the-object-in-array-which-is-the-property-of-an-another-arr 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…