viewmodel-react icon indicating copy to clipboard operation
viewmodel-react copied to clipboard

State preservation outside Meteor

Open antoninadert opened this issue 8 years ago • 2 comments

For offline users, in your next version, what I would like is to be able to store data in localstorage instead of saving in in component state, so that VM restores the full previous state that was available automatically. I could chose to use or not this localstorage automatic loading We can already keep the state in URL so why not in localstorage ?

antoninadert avatar Oct 06 '17 21:10 antoninadert

I'll revisit this one later on after the dust settles. I may end up adding an onLocalStorage option. No promises though.

In the meantime you can always use any of the many local storage libraries and save the component.data() in an autorun and loading it when the component is created.

ManuelDeLeon avatar Oct 06 '17 21:10 ManuelDeLeon

what's up on this? :)

antoninadert avatar Aug 15 '18 01:08 antoninadert