Skip to main content

RouteContextComponent

info

<RouteContextComponent> is purely internal component that is not exported from @archibald/core.

interface Props {
match: RouteMatchObject;
outlet: ReactElement | null;
}

type RouteMatchObject = Omit<RouteProps, 'children'> & {
children?: RouteMatchObject[];
fallback?: NonNullable<ReactNode> | null;
params: Params;
pathname: string;
pathnameBase?: string;
pattern: URLPattern;
segments: string[];
};

<RouteContextComponent> is responsible to render found matches per defined <Route>s patterns for the current URL. It renders RouteContext alongside with OutletContext.

Moreover, it's responsible for transitions on a route change and breaking idle UI state if request for the next page takes longer than 300ms (or any other provided delay value in <SuspenseRouter>).