Skip to content

Instantly share code, notes, and snippets.

@pavsidhu
Last active January 29, 2017 11:20
Show Gist options
  • Save pavsidhu/521adb4ce3b73119515056338a758c97 to your computer and use it in GitHub Desktop.
Save pavsidhu/521adb4ce3b73119515056338a758c97 to your computer and use it in GitHub Desktop.
Redux action definition example
// We speciify the name of the action as a variable
const ADD_TO_COUNTER = 'ADD_TO_COUNTER'
// This is an action creator, it simply specifies the action.
// this is what we call to send an action.
export function addToCounter() {
return {
type: ADD_TO_COUNTER
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment