tinybase
tinybase copied to clipboard
Extra persister events (start + finish)
Is your feature request related to a problem? Please describe.
- There's currently no way to let users know when their data is done being persisted when auto-saving.
- We currently cannot get a precise timestamp of the last save.
Describe the solution you'd like
As suggested by @rob-gordon on Discord, it'd be nice to be able to subscribe to persister events, such as startAutoSave, finishedAutoSave, and potentially the same for auto-loading.
Describe alternatives you've considered For the timestamp problem, I've added a listener on the checkpoints, which is granular enough for my use case.
OK I like this. In the middle of a few other things but let's see...
OK, this API is going to land soon:
There will also be hooks and <Provider /> support so this state can be tracked in a UI. Hoping this works for you!
OK, this is shipped in 5.3.0-beta.3. Take a look at the new methods, listeners and hooks, and see if it does what you need!