Hex Core JS
    Preparing search index...

    Type Alias PageInfo<TitleType, ToType, Params>

    Describes a page of an application. Includes details on the page's meta information (e.g. title and description) and routing to the page.

    All PageInfo objects in an application should form a tree with the application's root page info as the root. This means all page info objects should have a parent except for the root page info and all page info objects should be descendants of the root page info.

    To accomodate common import patterns, it is recommended to define the PageInfo for a page in a separate file in the same directory. This can have the name file.pageinfo.ts or pageinfo.ts (if the page component is defined in index.tsx).

    type PageInfo<
        TitleType extends PageInfoTitle,
        ToType extends PageInfoTo,
        Params extends RouteParams,
    > = {
        description: string;
        exact: boolean;
        isLeaf: boolean;
        key: string;
        name: string;
        noSearch: boolean;
        paramsType: Params;
        parent: PageInfo<any, any, any> | null;
        path: string;
        routeProps: RouteProps;
        title: TitleType;
        to: ToType;
        useKey: () => string;
        useMatch: () => RouteMatch<Params> | null;
        useParams: () => Params;
    }

    Type Parameters

    Index

    Properties

    description: string
    exact: boolean
    isLeaf: boolean
    key: string
    name: string
    noSearch: boolean
    paramsType: Params
    parent: PageInfo<any, any, any> | null
    path: string
    routeProps: RouteProps

    To pass to a <Route> component.

    title: TitleType
    to: ToType
    useKey: () => string

    Provides a key that unique to the route parameter values to provide to page components to reset component identity when route parameters change (e.g. an object detail page's object ID).

    useMatch: () => RouteMatch<Params> | null

    Wraps the useRouteMatch hook, providing default arguments relevant to this page.

    useParams: () => Params

    Wraps the useParams hook, providing default arguments relevant to this page.