A custom hook that provides functionality for managing and rendering an outlet modal.

  • Type Parameters

    • Data extends {} = Record<string, any>

      The type of data associated with the outlet modal.

    • Payload = any

      The type of payload passed during submission.

    • Params = any

      The type of additional parameters.

    Parameters

    Returns {
        close: () => Promise<boolean>;
        open: (
            url?: string | URL,
            target?: string,
            features?: string,
        ) => null | Window;
        pickData: (id: string) => void;
        render: () => Element;
    }

    • An object containing the following methods and properties:
      • open - A boolean value indicating whether the modal is open.
      • render - A function that renders the outlet modal.
      • pickData - A function used to pick data for the modal.
      • close - A function used to close the modal.
    • Readonlyclose: () => Promise<boolean>
    • Readonlyopen: (url?: string | URL, target?: string, features?: string) => null | Window
    • ReadonlypickData: (id: string) => void
    • Readonlyrender: () => Element