Bump version, drop storage stuff

This commit is contained in:
Jon Staab
2025-09-30 15:05:44 -07:00
parent 79163310c3
commit a2d519766d
20 changed files with 31 additions and 454 deletions
-32
View File
@@ -1,32 +0,0 @@
# Storage
The storage system provides IndexedDB persistence for stores and repositories.
Initialize this early in your application lifecycle to ensure data consistency.
```typescript
import {initStorage, defaultStorageAdapters} from '@welshman/app'
// Use default storage adapters, which track important metadata events,
// relays, handles, zappers, etc.
await initStorage("my-db", 1, {
...defaultStorageAdapters,
custom: {
keyPath: "key",
init: async () => console.log(await getAll("custom")),
sync: () => {
// Set up a listener for changes, using bulkPut to save records.
// Return an unsubscribe function for cleanup
},
},
})
```
The storage system:
- Persists data across page reloads
- Throttles writes for performance
- Syncs bidirectionally
- Supports custom adapters
Initialize storage before making any subscriptions or loading data to ensure proper caching behavior.