Perke – 11-14 Oct 29
im trying to update array with spread operator but it says
whats the problem?
state.usersList is not iterablewhats the problem?
state.usersList is not iterablestate.usersList is not iterableconst initialState = {
usersList: [
{
id: "",
asks: {
id: "",
name: "",
price: null,
},
},
],
};
state.usersList = [...state.usersList, { id: uid }];const initialState = {
usersList: [
{
id: "",
asks: {
id: "",
name: "",
price: null,
},
},
],
};
state.usersList = [...state.usersList, { id: uid }];