Skip to content

Instantly share code, notes, and snippets.

@dabit3
Created February 18, 2017 18:43
Show Gist options
  • Save dabit3/e97421b0a4532c14e672e7a2a8a73c5f to your computer and use it in GitHub Desktop.
Save dabit3/e97421b0a4532c14e672e7a2a8a73c5f to your computer and use it in GitHub Desktop.
Medium - redux4ways - actions.js
import { FETCHING_DATA, FETCHING_DATA_SUCCESS, FETCHING_DATA_FAILURE } from './constants'
export function getData() {
return {
type: FETCHING_DATA
}
}
export function getDataSuccess(data) {
return {
type: FETCHING_DATA_SUCCESS,
data,
}
}
export function getDataFailure() {
return {
type: FETCHING_DATA_FAILURE
}
}
export function fetchData() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment