Created
April 27, 2018 05:58
-
-
Save agoldis/94e164f35f9335b9980b4717b1b4e71f to your computer and use it in GitHub Desktop.
redux - full example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { deriveState } from "./deriveState"; | |
| export const enhanceStore = createStore => ( | |
| reducer, | |
| preloadedState, | |
| enhancer | |
| ) => { | |
| const store = createStore(reducer, preloadedState, enhancer); | |
| const _getState = store.getState; | |
| store.getState = () => deriveState(_getState()); | |
| return store; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment