Type Alias: UndoableReset<T>
UndoableReset<
T> = (next?) =>void
Defined in: use-undoable-state.ts:31
Reset accepted by useUndoableState. Clears the bound scope's history
(past + future) and overwrites the value.
reset()— restore the value captured on first render and clear history.reset(next)— set the value tonextand clear history.reset(() => next)— same asreset(next), with a lazy factory.
The reset itself is not undoable: it does not push an entry, and the surrounding scope is wiped entirely so prior entries cannot be replayed.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
next? | T | (() => T) |
Returns
void