Skip to content

Instantly share code, notes, and snippets.

@Danielshow
Created May 31, 2019 22:18
Show Gist options
  • Save Danielshow/2b1c6012eaf357a0eb46710f0b35c61e to your computer and use it in GitHub Desktop.
Save Danielshow/2b1c6012eaf357a0eb46710f0b35c61e to your computer and use it in GitHub Desktop.
export const Types = {
ADD_TODO: 'ADD_TODO',
DELETE_TODO: 'DELETE_TODO'
}
export const addTodo = (todo) => ({
type: Types.ADD_TODO,
payload: todo
})
export const deleteTodo = (id) => ({
types: Types.DELETE_TODO,
payload: id
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment