Created
September 3, 2018 08:12
-
-
Save drex44/d0aa8a0eeccaa676278bc622940807ef 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
// types of action | |
const Types = { | |
CREATE_ITEM: "CREATE_ITEM", | |
DELETE_ITEM: "DELETE_ITEM" | |
}; | |
// actions | |
const createItem = task => ({ | |
type: Types.CREATE_ITEM, | |
payload: task | |
}); | |
const deleteItem = id => ({ | |
type: Types.DELETE_ITEM, | |
payload: id | |
}); | |
export default { | |
createItem, | |
deleteItem, | |
Types | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment