Skip to content

Instantly share code, notes, and snippets.

@arqex
Created September 19, 2015 12:03
Show Gist options
  • Save arqex/94124081333099b99c68 to your computer and use it in GitHub Desktop.
Save arqex/94124081333099b99c68 to your computer and use it in GitHub Desktop.
// state variable is immutable
var state = freezer.get();
// Accessing is easy
console.log( state.todos ); // []
console.log( state.status ); // 'ready'
// But it is not possible to
// update the state directly
state.status = 'loading';
console.log( state.status ); // 'ready'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment