Allow multiple state modules to handle the same action
In some cases multiple state modules may need to handle the same action. For example, when annotations are loaded or unloaded we may want to update both the set of loaded annotations and also the current selection. This commit changes the `createReducer` helper and the code that uses it in `reducers/index.js` so that multiple state modules can define update functions that handle the same action. Note that all update functions get the same, _previous_ state as input and there is no guarantee on precedence if they return conflicting updates. See also: https://redux.js.org/faq/actions#is-there-always-a-one-to-one-mapping-between-reducers-and-actions
Showing
Please register or sign in to comment