mobx-stored
a simple utility for persisting POJO objects into localStorage via mobx observables. Not only they persist through sessions, they also synchronize via storage events across all browser tabs.
usage
const defaultUser = email: null firstname: null lastname: null const observableUserProfile = // last parameter is optional-mobx autorun options for running the save operation into the storage. Use higher delay if you store a lot of data // now any changes made to the observableUserProfile are synced in localStorage observableUserProfilename = 'Michael' // after 500ms and reloading the page observableUserProfilename === 'Michael' // true // revert to the default values observableUserProfile // need to add new properties? observableUserProfile //Don't need it anymore? observableUserProfile // removes it from localStorage