Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created August 17, 2017 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/dd96dd3e73ef1eba797fb1cb1b60517c to your computer and use it in GitHub Desktop.
Save matthieu-D/dd96dd3e73ef1eba797fb1cb1b60517c to your computer and use it in GitHub Desktop.
@dispatch()
loadColors = (): ColorLoadAction => ({
type: ColorActions.LOAD_COLORS,
meta: null,
payload: null
});
@dispatch()
addColors = (colors: string[]): ColorAddAction => ({
type: ColorActions.ADD_COLORS,
meta: { colors },
payload: colors
});
@dispatch()
removeLastColor = (): ColorRemoveAction => ({
type: ColorActions.REMOVE_LAST_COLOR,
meta: null,
payload: null
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment