You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I attempt to update the state with devices like so,
const id = '123'
dotProp.set(state, 'devices', list => [...list, id])
I will get an error because list is being defaulted to an object. Instead it would be nice to leave that as undefined for the user to be able to use default params to have better control. So instead it would look like this,
currently, if I have
and I attempt to update the state with devices like so,
I will get an error because
list
is being defaulted to an object. Instead it would be nice to leave that as undefined for the user to be able to use default params to have better control. So instead it would look like this,or if I want my devices to be an object keyed on the ids I could do something like,
An alternative approach would be to have a optional parameter at the end to change the default value from
{}
to[]
The text was updated successfully, but these errors were encountered: