@fukict/flux 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ class Counter extends Fukict {
|
|
|
64
64
|
|
|
65
65
|
render() {
|
|
66
66
|
const state = counterFlux.getState();
|
|
67
|
-
const actions = counterFlux.
|
|
67
|
+
const actions = counterFlux.actions;
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<div>
|
|
@@ -425,9 +425,9 @@ const appFlux = createAppFlux();
|
|
|
425
425
|
|
|
426
426
|
// Use in components
|
|
427
427
|
appFlux.user.getState();
|
|
428
|
-
appFlux.user.
|
|
428
|
+
appFlux.user.actions.setUser(...);
|
|
429
429
|
appFlux.todo.getState();
|
|
430
|
-
appFlux.todo.
|
|
430
|
+
appFlux.todo.actions.addTodo(...);
|
|
431
431
|
```
|
|
432
432
|
|
|
433
433
|
## API Reference
|
|
@@ -465,12 +465,12 @@ Updates state with partial state object.
|
|
|
465
465
|
flux.setState({ count: 10 });
|
|
466
466
|
```
|
|
467
467
|
|
|
468
|
-
### flux.
|
|
468
|
+
### flux.actions
|
|
469
469
|
|
|
470
|
-
|
|
470
|
+
Actions object defined in createFlux config.
|
|
471
471
|
|
|
472
472
|
```typescript
|
|
473
|
-
const actions = flux.
|
|
473
|
+
const actions = flux.actions;
|
|
474
474
|
actions.increment();
|
|
475
475
|
```
|
|
476
476
|
|