Optional
Readonly
deepOptional
Readonly
filterKeys the plugin should save or ignore.
The behavior depends on the value of StoreFrontendOptions.filterKeysStrategy.
Optional
Readonly
filterStrategy to use when filtering keys.
pick
: Only the specified keys will be synced and saved.omit
: All keys will be synced and saved except the ones specified.You can also provide a custom function that will be called for each key.
If the function returns true
, the key will be saved and synced.
The filtering is shallow, meaning that nested keys will not be filtered.
Optional
Readonly
flushOptional
Readonly
hooksHooks to run custom logic at specific points in the store lifecycle.
Optional
saveInterval in milliseconds to use when saving the store.
This option is only valid when StoreBackendOptions.saveStrategy is set to debounce
or throttle
.
Optional
saveSaves the store whenever there is a state change.
Optional
saveSaves the store automatically on a graceful exit.
Optional
saveStrategy to use when saving the store.
For a detailed explanation about the differences between debounce
and throttle
, see:
https://kettanaito.com/blog/debounce-vs-throttle
Optional
Readonly
syncInterval in milliseconds to use when syncing the store with the backend.
This option is only valid when StoreFrontendOptions.syncStrategy is set to debounce
or throttle
.
Optional
Readonly
syncStrategy to use when syncing the store with the backend.
Whenever there's a state change, the store sends a notification to Rust so they can stay in sync.
Since data gets serialized every time this happens, it can be expensive to do it too often.
To mitigate this, we can use debounce
or throttle
to control how often this synchronization occurs.
If the value is a number, the plugin will use debounce
with the specified value as the interval.
If null
or undefined
, the strategy will be immediate
.
For a detailed explanation about the differences between debounce
and throttle
, see:
https://kettanaito.com/blog/debounce-vs-throttle
Options for the Pinia plugin.