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

    Function useUndo

    • Custom hook to manage undo/redo state with automatic re-renders.

      Type Parameters

      • T

        The type of the state being managed.

      Parameters

      • OptionalinitialState: IUndoState<T>

        The initial undo state.

      Returns IUndoObject<T>

      An undo object for managing state history with automatic re-renders.

      This hook triggers component re-renders whenever the state changes. If you don't need re-renders, use useUndoRef instead for better performance.