Last active
March 2, 2018 11:42
-
-
Save thevangelist/73d1f9505f92e819e5c83df1f4841e24 to your computer and use it in GitHub Desktop.
The Only Reducer You'll Ever Need
This file contains 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
// Change anything with this reducer ;)! | |
const onlyReducerYoullEverNeed = (state={}, action) => { | |
return { | |
...state, | |
action.payload | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment