Created
February 18, 2017 18:43
-
-
Save dabit3/e97421b0a4532c14e672e7a2a8a73c5f to your computer and use it in GitHub Desktop.
Medium - redux4ways - actions.js
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
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