Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
2.2.0.tar.gz | 2019-08-18 | 324.5 kB | |
2.2.0.zip | 2019-08-18 | 411.2 kB | |
README.md | 2019-08-18 | 536 Bytes | |
Totals: 3 Items | 736.2 kB | 0 |
New Features
-
Global reducers now receive a dispatch function in addition to the dispatch object. This dispatch function asynchronously calls
setGlobal
and returns the new global state, allowing you toawait
the change. This is the first step towards sagas. [#116]:::javascript function myReducer(global, dispatch, ...params) { await dispatch({ change: 1 }); // <-- dispatch is a function await disaptch.someOtherReducer(params); // <-- dispatch is a map await dispatch({ change 2 }); }