Interface: UseUndoableStateOptions<T>
Defined in: types.ts:601
Options for useUndoableState.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The state value type. |
Properties
coalesceKey?
optionalcoalesceKey?:string
Defined in: types.ts:609
Coalesce key applied to every command pushed by the setter. Use this to group bursts (typing, dragging) into one entry.
coalesceWindowMs?
optionalcoalesceWindowMs?:number
Defined in: types.ts:615
Optional per-command coalescing window override applied by the setter.
See Command.coalesceWindowMs for semantics.
equals?
optionalequals?: (a,b) =>boolean
Defined in: types.ts:620
Equality predicate used to suppress no-op writes. Defaults to Object.is.
Parameters
| Parameter | Type |
|---|---|
a | T |
b | T |
Returns
boolean
label?
optionallabel?:string
Defined in: types.ts:603
Optional label applied to every command pushed by the setter.
scopeId?
optionalscopeId?:string
Defined in: types.ts:628
Scope id to push entries into. Defaults to "default". The hook pins
to this scope rather than tracking the active scope so React state
stays bound to a stable history surface even when the user's focus
(and the active claim) moves elsewhere.