Created
February 11, 2019 19:40
-
-
Save aigoncharov/1597e477ebe16138d508fe9ce1090d7a to your computer and use it in GitHub Desktop.
Reducer organization - taking a step further
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 getReducerMap = (methodsWithActionTypes) => | |
methodsWithActionTypes.reduce((reducerMap, { method, actionType }) => { | |
reducerMap[actionType] = method | |
return reducerMap | |
}, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment