You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LocalStore is an Emily Store that can be synchronized with a localStorage for data persistence.
###Creating a LocalStore
// A LocalStore is a subtype of an Emily Store, following liskov substitution princple.varlocalStore=newLocalStore(["default","values"]);
###Saving data in the browser
It adds a new sync function.
// On sync, values already existing in localStorage.store will be mixed in the Store// And on changes, localStorage will be updatedlocalStore.sync("store");
Notice though that if localStorage is modified from somewhere else, the Store won't be updated.
There's no notification on localStorage changes.