React Corsair - v0.0.10
    Preparing search index...

    Interface SSRRouterOptions<Context>

    Options provided to the SSRRouter constructor.

    interface SSRRouterOptions<Context> {
        context?: Context;
        errorComponent?: ComponentType;
        loadingAppearance?: LoadingAppearance;
        loadingComponent?: ComponentType;
        nonce?: string;
        notFoundComponent?: ComponentType;
        renderingDisposition?: RenderingDisposition;
        routes: Route<any, any, any, Context>[];
        stateStringifier?: (state: RouteState) => string;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    context?: Context

    A context provided to route data loaders.

    errorComponent?: ComponentType

    A component that is rendered when an error was thrown during route rendering.

    This component is used only for root routes that don't specify their own errorComponent.

    Routes without an errorComponent don't have an error boundary.

    loadingAppearance?: LoadingAppearance

    What to render when lazyComponent or dataLoader are being loaded.

    This is the default setting for all routes that don't specify their own loadingAppearance.

    "reroute"
    
    loadingComponent?: ComponentType

    A component that is rendered when a lazyComponent or a dataLoader are being loaded. Render a skeleton or a spinner in this component to notify user that a new route is being loaded.

    This component is used only for root routes that don't specify their own loadingComponent.

    Routes without a loadingComponent suspend a parent route.

    nonce?: string

    A nonce string to allow hydration scripts under a script-src Content-Security-Policy.

    notFoundComponent?: ComponentType

    A component that is rendered if notFound was called during route loading or rendering or if there's no route that matches the location a router was navigated to.

    This component is used only for root routes that don't specify their own notFoundComponent.

    Routes without notFoundComponent propagate notFound to a parent route.

    renderingDisposition?: RenderingDisposition

    Where the route is rendered.

    This is the default setting for all routes that don't specify their own renderingDisposition.

    "server"
    
    routes: Route<any, any, any, Context>[]

    Routes that a router can match.

    stateStringifier?: (state: RouteState) => string

    Stringifies a route state before it is sent to the client.

    Type declaration

    JSON.stringify