Persistence
Overview
By default, Kritzel uses an empty provider list (providers: []), so canvas state resets on page reload. To persist data locally in the browser, configure syncConfig with IndexedDBSyncProvider.
IndexedDB persistence is ideal when you want users to keep their canvas state across reloads and browser restarts on the same device.
Persisting Canvas State with IndexedDB
Configure IndexedDBSyncProvider in syncConfig.providers to make object state durable in the browser.
Related API Methods
- Sync configuration (
syncConfig,KritzelSyncConfig) - Local persistence provider (
IndexedDBSyncProvider) - Provider list (
syncConfig.providers)
For a comprehensive view, see the API Reference.