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: CHANGELOG.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@
8
8
9
9
#### `Reactor#serialize()`
10
10
11
-
Returns a plain javascript object representing the application state. By defualt this maps over all stores and returns `toJS(storeState)`.
11
+
Returns a plain JavaScript object representing the application state. By default this maps over all stores and returns `toJS(storeState)`.
12
12
13
13
```js
14
14
reactor.loadState(reactor.serialize())
15
15
```
16
16
17
17
#### `Reactor#loadState( state )`
18
18
19
-
Takes a plain javascript object and merges into the reactor state, using `store.deserialize`
19
+
Takes a plain JavaScript object and merges into the reactor state, using `store.deserialize`
20
20
21
21
This can be useful if you need to load data already on the page.
22
22
@@ -29,7 +29,7 @@ reactor.loadState({
29
29
30
30
#### `Store#serialize`
31
31
32
-
Serialization method for the store's data, by default its implemented as `Nuclear.toJS' which converts ImmutableJS objects to plain javascript.
32
+
Serialization method for the store's data, by default its implemented as `Nuclear.toJS' which converts ImmutableJS objects to plain JavaScript.
33
33
This is overridable for your specific data needs.
34
34
35
35
```js
@@ -48,7 +48,7 @@ Nuclear.Store({
48
48
49
49
#### `Store#deserialize`
50
50
51
-
Serialization method for the store's data, by default its implemented as `Nuclear.toImmutable' which converts plain javascript objects to ImmutableJS data structures.
51
+
Serialization method for the store's data, by default its implemented as `Nuclear.toImmutable' which converts plain JavaScript objects to ImmutableJS data structures.
52
52
This is overridable for your specific data needs.
53
53
54
54
```js
@@ -79,7 +79,7 @@ Nuclear.Store({
79
79
80
80
## 1.0.1 (April 27, 2015)
81
81
82
-
-**[NEW]** Expose `createReactMixin` functionality on Nuclear singleton.
82
+
-**[NEW]** Expose `createReactMixin` functionality on NuclearJS singleton.
83
83
-**[FIXED]** Fix `new Store()` from throwing error when not passed a config object.
Nuclear maintains a very non-magical approach to dispatching actions. Simply call <code>reactor.dispatch</code> with the <code>actionType</code> and <code>payload</code>.
216
+
NuclearJS maintains a very non-magical approach to dispatching actions. Simply call <code>reactor.dispatch</code> with the <code>actionType</code> and <code>payload</code>.
217
217
</p>
218
218
219
219
<p>
220
-
All action handling is done synchronously, leaving the state of the system very predicatable after every action.
220
+
All action handling is done synchronously, leaving the state of the system very predictable after every action.
221
221
</p>
222
222
223
223
<p>
224
-
Because actions are simply functions, it is very easy to compose actions together using plain javascript.
224
+
Because actions are simply functions, it is very easy to compose actions together using plain JavaScript.
Copy file name to clipboardExpand all lines: docs/src/docs/03-creating-stores.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ In Flux, stores are used for managing application state, but they don't represen
9
9
10
10
More than simply managing ORM-style objects, **stores manage the state for a particular domain within the application**.
11
11
12
-
Unlike many other Flux libraries, Nuclear stores hold no state. Instead, they provide a collection of functions that transform current state into new state.
12
+
Unlike many other Flux libraries, NuclearJS stores hold no state. Instead, they provide a collection of functions that transform current state into new state.
13
13
14
14
Stores provide a `getInitialState` method, which returns the initial state value that a store will manage, and an `initialize` hook, which is used to define what
15
15
actions a store will respond to by attaching handlers.
In Nuclear, state can only be an ImmutableJS data type, such as an `Immutable.Map` or an `Immutable.List`, or a JavaScript primitive.
25
25
26
-
Because stores in Nuclear don't hold state — they simply receive state, transform it, and return new state — there is no need to worry about stores knowing
26
+
Because stores in NuclearJS don't hold state — they simply receive state, transform it, and return new state — there is no need to worry about stores knowing
27
27
about other stores. That means no confusing `store.waitsFor` and no cross-pollution of data. In Nuclear, the sole responsibility of a store is to return a portion
28
28
of existing or transformed application state. The responsibility of reading application state falls on **Getters**, which we'll cover later.
29
29
@@ -224,7 +224,7 @@ However, if stores are limited in scope, how can you read substantive data from
224
224
225
225
It's actually quite simple: **composition**.
226
226
227
-
Nuclear allows you to combine data from stores in a non-destructive manner, check it out:
227
+
NuclearJS allows you to combine data from stores in a non-destructive manner, check it out:
Once you have a functioning Nuclear Reactor, hooking it up to a React application is very easy using the `reactor.ReactMixin` + `getDataBindings()` method.
143
+
Once you have a functioning NuclearJS Reactor, hooking it up to a React application is very easy using the `reactor.ReactMixin` + `getDataBindings()` method.
144
144
145
-
Nuclear will automatically sync the value of a getter to your component via `this.setState` whenever the underlying getter value changes. Meaning you never
145
+
NuclearJS will automatically sync the value of a getter to your component via `this.setState` whenever the underlying getter value changes. Meaning you never
146
146
have to explicitly call `this.setState` to re-render a component.
147
147
148
148
In the next section we will cover hooking up actions to our react components.
0 commit comments