Skip to content

OptimisticOnError

type OptimisticOnError = (err, ctx) => void;

Opt-in error sink for an optimistic write. When provided (per-call or via <DropInProvider onError>), the action rolls back AND resolves to undefined — the rejection is replaced by this callback. Absence preserves the existing reject-after-rollback contract.

Parameter Type
err Error
ctx OptimisticOnErrorCtx

void