Created
August 26, 2019 14:33
-
-
Save arunkarnann/4ee557f5cebb83a38403254213f27d8d to your computer and use it in GitHub Desktop.
Action JS for Udemy Course
This file contains 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 * as ACTION_TYPES from "./action_types" | |
export const SUCCESS = { | |
type: ACTION_TYPES.SUCCESS | |
} | |
export const FAILURE = { | |
type: ACTION_TYPES.FAILURE | |
} | |
export const success = () => { | |
return { | |
type : ACTION_TYPES.SUCCESS | |
} | |
} | |
export const failure = () => { | |
return { | |
type: ACTION_TYPES.FAILURE | |
} | |
} | |
export const user_input = (text) => { | |
return { | |
type: ACTION_TYPES.USER_INPUT, | |
payload: text | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment