If I have a store like so...
const [store, setStore] = createStore([
[
{
foo: 1,
bar: 'a',
}
]
])
How would I update the value of foo (at [0][0]
) to be 2
using setStore
?
To update the value you use setStore like so...
setStore(0, 0, 'foo', 2);