Skip to content

Instantly share code, notes, and snippets.

@fay-jai
Last active August 8, 2016 22:20
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 fay-jai/48aca2ec4b785f53048032ef7bed8565 to your computer and use it in GitHub Desktop.
Save fay-jai/48aca2ec4b785f53048032ef7bed8565 to your computer and use it in GitHub Desktop.
/*
* Actions are plain old JavaScript objects. They adhere to particular
* interface in that they must have a "type" property, but aside from
* that, you can add any other property you want.
*/
const FREE_THROW = "FREE_THROW";
const TWO_POINT_SHOT = "TWO_POINT_SHOT";
// an example Action
const twoPointer = {
type: TWO_POINT_SHOT,
payload: {
points: 2
}
};
// another example Action
const freeThrow = {
type: FREE_THROW,
payload: {
points: 1
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment