Skip to content

frontend-web-editor


Variable: useUndoRedo

const useUndoRedo: UseUndoRedo

Defined in: app/hooks/faultTree/useUndeRedo.ts:39

Undo/redo state manager for the Fault Tree editor.

Remarks

Persists snapshots of the current graph with a bounded history, exposes imperative undo/redo handlers, and optionally binds common keyboard shortcuts (Ctrl/Cmd+Z and Shift+Ctrl/Cmd+Z). See https://redux.js.org/usage/implementing-undo-history for a general pattern.

Param

Optional configuration for history size and keyboard bindings.

Returns

Handlers to undo/redo, take snapshots, and booleans for whether actions are possible.