Last active
August 8, 2016 22:20
-
-
Save fay-jai/48aca2ec4b785f53048032ef7bed8565 to your computer and use it in GitHub Desktop.
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
/* | |
* 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