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
Copy file name to clipboardExpand all lines: src/routes/concepts/stores.mdx
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,8 @@ Within Solid, these stores can spawn a collection of reactive signals, each corr
9
9
10
10
## Creating a store
11
11
12
-
Stores were intentionally designed to manage data structures like objects and arrays but are capable of handling other data types, such as strings and numbers.
12
+
Stores can manage many data types, including: objects, arrays, strings, and numbers.
13
+
13
14
Using JavaScript's [proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) mechanism, reactivity extends beyond just the top-level objects or arrays.
14
15
With stores, you can now target nested properties and elements within these structures to create a dynamic tree of reactive data.
With path syntax, you can specify a range of indices to update or modify to target a subset of the elements within the array for modification.
255
+
With path syntax, you can target a subset of elements to update or modify by specifying a range of indices.
255
256
You can do this using an array of values:
256
257
257
258
```jsx
@@ -353,7 +354,7 @@ Other collection types, such as JavaScript [Sets](https://developer.mozilla.org/
353
354
### Data integration with `reconcile`
354
355
355
356
When new information needs to be merged into an existing store `reconcile` can be useful.
356
-
`reconcile` will determine the differences between new and existing data, initiating updates only when there are _changed_ values which avoids unnecessary updates.
357
+
`reconcile` will determine the differences between new and existing data and initiate updates only when there are _changed_ values, thereby avoiding unnecessary updates.
357
358
358
359
```jsx
359
360
const { createStore, reconcile } from "solid-js/stores"
0 commit comments