Perke – 11-14 Oct 29

im trying to update array with spread operator but it says state.usersList is not iterable
const 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 }];
whats the problem?
UU
Unknown User537d ago