beedle icon indicating copy to clipboard operation
beedle copied to clipboard

Add a persistent state option

Open Andy-set-studio opened this issue 7 years ago • 2 comments

It could be handy for state to persist in local storage. This is especially true for small, PWAs.

Todos

  • [ ] Add constructor parameter
  • [ ] Feature detect that storage is available
  • [ ] Hydrate from local storage on instantiation if enabled
  • [ ] Self-subscribe to changes and automatically update storage
  • [ ] Add clear method if the local storage needs clearing for some reason

Andy-set-studio avatar Aug 08 '18 09:08 Andy-set-studio

This would be a nice feature

MichaelFBA avatar Sep 18 '19 15:09 MichaelFBA

Hi, thanks for the great library. Has this persistent state enhancement been considered ? I am working on a similar feature. The only piece I am missing is to identify which property of the state triggered the change to avoid having to save the whole state object at every update. Any ideas ?

madeInLagny avatar May 16 '20 14:05 madeInLagny