Created
October 31, 2016 18:46
-
-
Save alexaivars/a9bae36e98e634e6cd877eea802a7e73 to your computer and use it in GitHub Desktop.
compose redux reducers
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
| export default function composeReducers(...reducers) { | |
| return (state, action) => reducers.reduce((result, fn)=>fn(result, action), state); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment