Last active
May 22, 2017 21:37
-
-
Save Louiefigz/7ea989b098524e8211b93c54220a9adf 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
export default function manageTasks(state = { | |
tasks: [], | |
}, action){ | |
switch (action.type) { | |
case 'ADD_TASK': | |
return Object.assign({}, state, { | |
tasks: state.tasks.concat(action.task) | |
}); | |
default: | |
return state; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment