Optional
Readonly
beforeBackendSync?: (state: S) => Option<Partial<S>>Optional
Readonly
beforeFrontendSync?: (state: S) => Option<Partial<S>>Hook that runs before the store attempts to update itself with data coming from Rust. Can be used to modify the state before the changes are applied.
Returning a nullish value will abort the operation.
Optional
Readonly
error?: (error: unknown) => MaybePromise<void>Custom error handler.
Hook that runs before the store sends its state to Rust. Can be used to modify the state before the sync.
Returning a nullish value will abort the operation.