Skip to content

Instantly share code, notes, and snippets.

@acdlite
Created January 28, 2015 15:14
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 acdlite/d1c1b7bc95e5f869424d to your computer and use it in GitHub Desktop.
Save acdlite/d1c1b7bc95e5f869424d to your computer and use it in GitHub Desktop.
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