Created
August 8, 2016 22:52
-
-
Save fay-jai/a83b088ecb849e9d09a740fc3c60bc0c to your computer and use it in GitHub Desktop.
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
const team1Hoop = createStore( /* ignore the arguments here for now */ ); | |
const twoPointer = { | |
type: TWO_POINT_SHOT, | |
payload: { | |
points: 2 | |
} | |
}; | |
/* | |
* The only way to modify the state of your application is by dispatching actions | |
* to the store. | |
*/ | |
team1Hoop.dispatch(twoPointer); | |
/* | |
* How the state inside the store might look like NOW: | |
* | |
* team1Hoop.__applicationState__ = { | |
* totalPoints: 2, | |
* playerList: [ list of players on team ] | |
* }; | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment