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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…