Open
Description
π Subject area/topic
/concepts/stores.mdx
π Page(s) affected (or suggested, for new content)
It would be nice if this also showed how to deal with a top-level array in the store. These examples walk to the array as a property of the store object but it indicates that the store could also be an array and the syntax for dealing with a top level array seems like it would have to be different.
π Description of content that is out-of-date or incorrect
const [store, setStore] = createStore({
userCount: 3,
users: [ ... ],
})
setStore("users", (currentUsers) => [
...currentUsers,
{
id: 3,
username: "michael584",
location: "Nigeria",
loggedIn: false,
},
])```
If the example users array was the store itself (`createStore([...users])`) then wouldn't most of the modifying examples be different?
### π₯οΈ Reproduction in StackBlitz (if reporting incorrect content or code samples)
_No response_