MAIDR JavaScript API
    Preparing search index...
    • Custom hook that manages the full Controller lifecycle for a MAIDR plot instance.

      Handles:

      • Controller creation on focus-in (deferred -- no throwaway Controller on mount)
      • Controller disposal on focus-out
      • Timer cleanup and stale-closure prevention
      • Unmount cleanup

      Returning to a hidden tab deliberately does nothing. Disposing and rebuilding the controller there put the cursor back on the first point, reset every slice (text, braille, any open dialog) and aborted an in-flight chat answer along with the conversation -- all without an announcement, because focus never left the figure and so no focus-in followed. A suspended AudioContext needs no rebuild: AudioService defers its cues behind resume() already.

      Parameters

      • data: Maidr

        The MAIDR configuration describing the plot

      • store: EnhancedStore

        The per-instance Redux store

      Returns UseMaidrControllerResult

      Refs, context value, and event handlers for the component to wire up