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
@@ -56,9 +56,9 @@ The CDN puts the library on `window.CoreFlux`.
56
56
57
57
### Data model
58
58
59
-
Core Flux has a relatively simple data model that will come into play when writing bindings.
59
+
Core Flux has a relatively simple data model that you should understand when writing state bindings.
60
60
61
-
Here is how a store would look in memory:
61
+
Here is how state looks in all cases:
62
62
63
63
```js
64
64
Store {
@@ -73,9 +73,9 @@ Store {
73
73
}
74
74
```
75
75
76
-
Each subscription contains a `subscriber` and some form of `data` that informs a relationship between `state` and `subscriber`. See [`createStore`](#createstore) on how to add subscriptions.
76
+
Each item in `subscriptions` contains a `subscriber` and some form of `data` that informs a relationship between `state` and `subscriber`. See [`createStore`](#createstore) on how to add subscriptions.
77
77
78
-
Keep this data model in mind when adding new subscriptions and creating bindings.
78
+
`state` is the object you define as your store's initial state value.
79
79
80
80
### createStore
81
81
@@ -87,61 +87,68 @@ The function **requires** all four of its arguments, as shown here:
Once a store is created, you'll be able to add subscriptions with `subscribe` and request state updates with `dispatch`.
@@ -168,7 +175,7 @@ In the above example, we've designed our subscriber, the `FooItems` class, to de
168
175
169
176
Additionally, when this `subscribe` call is made, the `bindSubscriber` function will be called where the result of a subscription can be defined. E.g., assigning a default value from state into the subscriber.
170
177
171
-
> In general, you should try to use a simple data structure as the second argument to `subscribe`; this ensures your state binding has consistent expectations.
178
+
> In general, you should try to use a simple data structure as the second argument to `subscribe`; this ensures your bindings have generic and consistent expectations.
0 commit comments