beedle
beedle copied to clipboard
Add a persistent state option
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
clearmethod if the local storage needs clearing for some reason
This would be a nice feature
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 ?