Created
January 28, 2015 15:14
-
-
Save acdlite/d1c1b7bc95e5f869424d 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
class Store { | |
constructor(state = {}) { | |
this.state = state; | |
} | |
getState() { | |
return this.state; | |
} | |
} | |
let s = new Store({ foo: 'bar' }); | |
console.log(JSON.stringify(s.getState())); // {"foo":"bar"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment