Last active
October 7, 2016 20:22
-
-
Save jacobp100/7d9d78ff64e4b75dbc11769c0ea08c0d to your computer and use it in GitHub Desktop.
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
| const reducerMiddleware = (reducer, initialState) => store => { | |
| let state = initialState; | |
| store.getState = () => state; | |
| return () => (action) => { state = reducer(state, action); }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment