Plumile JS API
    Preparing search index...

    Type Alias RoutingContextType<TVariables, S, TQueryShape, TContext>

    Router context type that provides navigation and state management.

    type RoutingContextType<
        TVariables extends ParamData,
        S extends Schema | undefined = Schema | undefined,
        TQueryShape extends UnknownQueryShape = UnknownQueryShape,
        TContext = unknown,
    > = {
        get: () => RouteEntry<TVariables, S, TContext>;
        history: BrowserHistory;
        navigate: (
            opts: {
                filters?: S extends Schema ? InferFilters<S> : UnknownFilters;
                pathname?: string;
                query?: TQueryShape;
                replace?: boolean;
            },
        ) => void;
        preload: (target: PreloadTarget) => void;
        preloadCode: (target: PreloadTarget) => void;
        subscribe: (
            callback: SubscribeCallback<TVariables, S, TContext>,
        ) => () => void;
    }

    Type Parameters

    Index

    Properties

    Get the current route entry

    Browser history instance for navigation

    navigate: (
        opts: {
            filters?: S extends Schema ? InferFilters<S> : UnknownFilters;
            pathname?: string;
            query?: TQueryShape;
            replace?: boolean;
        },
    ) => void

    Navigate with optional pathname and typed/raw query object

    preload: (target: PreloadTarget) => void

    Preload code and data for a route without storing the result

    preloadCode: (target: PreloadTarget) => void

    Preload code for a route without storing the result

    subscribe: (callback: SubscribeCallback<TVariables, S, TContext>) => () => void

    Subscribe to route changes (schema derivable, not needed in signature)