Skip to content

Commit 8f9ee82

Browse files
Update src/routes/concepts/stores.mdx
Co-authored-by: Sarah <[email protected]>
1 parent 5d87ce0 commit 8f9ee82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/concepts/stores.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ setStore("users", (otherUsers) => [
270270
])
271271
```
272272

273-
The path syntax appends the new element by setting it at the index equal to `store.users.length`, modifying the existing array. This triggers reactivity only for effects tracking the new index or properties like `store.users.length`, making it more efficient for targeted updates.
273+
The path syntax adds the new element by assigning it to the index equal to `store.users.length`, directly modifying the existing array.
274+
This triggers reactivity only for effects that depend on the new index or properties like `store.users.length`, making updates more efficient and targeted.
274275

275276
```jsx
276277
setStore("users", store.users.length, {

0 commit comments

Comments
 (0)