Created
January 17, 2020 13:52
-
-
Save adedayojs/04f870e3dab96da5372877a4bd608364 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
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