Sanity Library Reference Docs
    Preparing search index...

    Interface RouterProviderProps

    The props for the RouterProvider component.

    interface RouterProviderProps {
        children: ReactNode;
        onNavigate: (opts: { path: string; replace?: boolean }) => void;
        router: Router;
        state: RouterState;
    }
    Index

    Properties

    children: ReactNode

    The child elements to render.

    onNavigate: (opts: { path: string; replace?: boolean }) => void

    A function that is called when the user navigates to a new path. Takes an object containing the path to navigate to and an optional replace flag.

    router: Router

    The router object that is used to handle navigation. See Router

    The current state of the router. See RouterState