This repository was archived by the owner on Feb 14, 2023. It is now read-only.
2.2.0
New Features
- Global reducers now receive a dispatch function in addition to the dispatch object. This dispatch function asynchronously calls
setGlobaland returns the new global state, allowing you toawaitthe change. This is the first step towards sagas. #116
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 });
}