Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/routes/concepts/stores.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ It receives the old value and index as arguments, providing the flexibility to m
setStore("users", (user) => user.username.startsWith("t"), "loggedIn", false)
```

In addition to [`.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith), you can use other array methods like [`.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) to filter for the values that you need.
Comment thread
LadyBluenotes marked this conversation as resolved.

## Modifying objects

When using store setters to modify objects, if a new value is an object, it will be shallow merged with the existing value.
Expand Down