1.0.58 - The storage garbage collection update
BREAKING CHANGES
- AsyncLocalStorage and SyncLocalStorage (along with their hooks) now accept a prefix as first parameter
useAsyncLocalStorage("mycache")
Default prefix is xswr:
CHANGES
- Storages are now doing garbage collection out of the box! ⚡️
- Added garbage collection on unmount and on page unload for SyncLocalStorage and AsyncLocalStorage
- Added garbage collection on unmount and on page load for IDBStorage
- Added
collect()
andunmount()
methods on all storages