Interface IOutlet<Data, Payload, Params, OtherProps>

Represents an outlet that can be used to render content in a specific location in a React application.

interface IOutlet<
    Data = IAnything,
    Payload = IAnything,
    Params = IAnything,
    OtherProps = IOtherProps,
> {
    element: (
        props: IOutletProps<Data, Payload, Params> & OtherProps,
    ) => ReactElement;
    id: string;
    isActive: (pathname: string) => boolean;
    isAvailable?: (pathname: string) => boolean;
}

Type Parameters

  • Data = IAnything

    The type of data to be passed to the outlet's props.

  • Payload = IAnything

    The type of payload to be passed to the outlet's props.

  • Params = IAnything

    The type of URL parameters to be passed to the outlet's props.

  • OtherProps = IOtherProps

    Additional properties to be passed to the outlet's props.

Properties

element: (
    props: IOutletProps<Data, Payload, Params> & OtherProps,
) => ReactElement

The React component function that renders the outlet's content.

id: string

The unique identifier of the outlet.

isActive: (pathname: string) => boolean

A function that determines whether the outlet is active for a given pathname.

isAvailable?: (pathname: string) => boolean

Optional. A function that determines whether the outlet is available for a given pathname.