Skip to content

Instantly share code, notes, and snippets.

@adedayojs
Created January 17, 2020 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adedayojs/04f870e3dab96da5372877a4bd608364 to your computer and use it in GitHub Desktop.
Save adedayojs/04f870e3dab96da5372877a4bd608364 to your computer and use it in GitHub Desktop.
function addAction(type, payload){
action = {
type:'ADD',
payload
}
return action
}
function removeAction(type, payload){
action = {
type:'REMOVE',
payload
}
return action
}
// Whenever this functions are called the action is created.
// You will mostly use action with reducers by passing them as
// arguments into reducers so that the reducer can know what to do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment