React Router API Reference
    Preparing search index...

    Type Alias BaseRouteObjectInternal

    Base RouteObject with common props shared by all types of routes

    type BaseRouteObject = {
        action?: ActionFunction | boolean;
        caseSensitive?: boolean;
        Component?: React.ComponentType | null;
        element?: React.ReactNode | null;
        ErrorBoundary?: React.ComponentType | null;
        errorElement?: React.ReactNode | null;
        handle?: any;
        hasErrorBoundary?: boolean;
        HydrateFallback?: React.ComponentType | null;
        hydrateFallbackElement?: React.ReactNode | null;
        id?: string;
        lazy?: LazyRouteDefinition<BaseRouteObject>;
        loader?: LoaderFunction | boolean;
        middleware?: MiddlewareFunction[];
        path?: string;
        shouldRevalidate?: ShouldRevalidateFunction;
    }
    Index

    Properties

    action?: ActionFunction | boolean

    The route action. See action.

    caseSensitive?: boolean

    Whether the path should be case-sensitive. Defaults to false.

    Component?: React.ComponentType | null

    The React Component to render when this route matches. Mutually exclusive with element.

    element?: React.ReactNode | null

    The React element to render when this Route matches. Mutually exclusive with Component.

    ErrorBoundary?: React.ComponentType | null

    The React Component to render at this route if an error occurs. Mutually exclusive with errorElement.

    errorElement?: React.ReactNode | null

    The React element to render at this route if an error occurs. Mutually exclusive with ErrorBoundary.

    handle?: any

    The route handle.

    hasErrorBoundary?: boolean
    HydrateFallback?: React.ComponentType | null

    The React Component to render while this router is loading data. Mutually exclusive with hydrateFallbackElement.

    hydrateFallbackElement?: React.ReactNode | null

    The React element to render while this router is loading data. Mutually exclusive with HydrateFallback.

    id?: string

    The unique identifier for this route (for use with DataRouters)

    lazy?: LazyRouteDefinition<BaseRouteObject>

    A function that returns a promise that resolves to the route object. Used for code-splitting routes. See lazy.

    loader?: LoaderFunction | boolean

    The route loader. See loader.

    middleware?: MiddlewareFunction[]

    The route middleware. See middleware.

    path?: string

    The path pattern to match. If unspecified or empty, then this becomes a layout route.

    shouldRevalidate?: ShouldRevalidateFunction

    The route shouldRevalidate function. See shouldRevalidate.