Skip to content
Snippets Groups Projects
Unverified Commit 7f7e523d authored by Louis's avatar Louis :fire:
Browse files

redux-reducer

parent 93b362c1
No related branches found
No related tags found
No related merge requests found
module.exports = function(initial, handlers) {
return function(state = initial, {type, ...action}) {
if (handlers.hasOwnProperty(type)) {
return handlers[type](state, action)
}
return state
}
}
{
"name": "@commander-lol/redux-reducer",
"version": "1.0.0",
"description": "Remove the boilerplate for creating redux reducers",
"main": "index.js",
"repository": {},
"author": "Louis Capitanchik <contact@louiscap.co>",
"license": "BSD-2-Clause"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment