Created
December 20, 2014 20:56
-
-
Save goatslacker/09816e639301747f9ba2 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
var { Store, Dispatcher } = require('./dist/emf') | |
var myDispatcher = new Dispatcher() | |
class DogStore extends Store { | |
getInitialState() { | |
return { | |
dog: 2 | |
} | |
} | |
onAddDogAction(payload) { | |
this.state.dog = 4 | |
this.emitChange(); | |
} | |
} | |
var dogStore = new DogStore(myDispatcher) | |
dogStore.state.dog = 7 | |
console.log(dogStore.state.dog) // == 7 :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment