Kvaser CanKing GUI Extensions SDK - v7.5.1
    Preparing search index...

    Function useUndoRef

    • Custom hook to manage undo/redo state using a ref (does not trigger re-renders by default).

      Type Parameters

      • T

        The type of the undo/redo data.

      Parameters

      • OptionalinitialState: IUndoState<T>

        The initial undo state.

      Returns IUndoObject<T>

      An undo object for managing state history.

      This hook uses useRef and does not automatically trigger component re-renders. Use the subscribe method if you need to trigger re-renders on state changes, or use useUndo instead.