UNPKG

840 B TypeScript View Raw
1import * as React from 'react';
2import { RouterProviderProps as RouterProviderProps$1, RouterInit } from 'react-router';
3
4type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
5declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
6
7interface HydratedRouterProps {
8 /**
9 * Context object to passed through to `createBrowserRouter` and made available
10 * to `clientLoader`/`clientActon` functions
11 */
12 unstable_getContext?: RouterInit["unstable_getContext"];
13}
14/**
15 * Framework-mode router component to be used in `entry.client.tsx` to hydrate a
16 * router from a `ServerRouter`
17 *
18 * @category Component Routers
19 */
20declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
21
22export { HydratedRouter, RouterProvider, type RouterProviderProps };