Skip to content

Commit ce04eca

Browse files
authored
Add data router exports to react-router-dom-v5-compat (remix-run#10171)
1 parent c56d84c commit ce04eca

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router-dom-v5-compat": patch
3+
---
4+
5+
Add missed data router API re-exports

packages/react-router-dom-v5-compat/index.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@
4747
* deprecate the deep require if we wanted to avoid the duplication here.
4848
*/
4949
export type {
50+
BrowserRouterProps,
5051
Hash,
52+
HashRouterProps,
53+
HistoryRouterProps,
54+
LinkProps,
5155
Location,
5256
Path,
5357
To,
@@ -56,6 +60,7 @@ export type {
5660
NavigateOptions,
5761
NavigateProps,
5862
Navigator,
63+
NavLinkProps,
5964
OutletProps,
6065
Params,
6166
ParamParseKey,
@@ -70,6 +75,36 @@ export type {
7075
Pathname,
7176
Search,
7277
RoutesProps,
78+
ParamKeyValuePair,
79+
URLSearchParamsInit,
80+
// New stuff from RR 6.4
81+
ActionFunction,
82+
ActionFunctionArgs,
83+
AwaitProps,
84+
unstable_Blocker,
85+
unstable_BlockerFunction,
86+
DataRouteMatch,
87+
DataRouteObject,
88+
Fetcher,
89+
FetcherWithComponents,
90+
FormEncType,
91+
FormMethod,
92+
FormProps,
93+
GetScrollRestorationKeyFunction,
94+
IndexRouteObject,
95+
JsonFunction,
96+
LoaderFunction,
97+
LoaderFunctionArgs,
98+
Navigation,
99+
NonIndexRouteObject,
100+
PathPattern,
101+
RedirectFunction,
102+
RelativeRoutingType,
103+
RouterProviderProps,
104+
ScrollRestorationProps,
105+
ShouldRevalidateFunction,
106+
SubmitFunction,
107+
SubmitOptions,
73108
} from "./react-router-dom";
74109
export {
75110
BrowserRouter,
@@ -109,6 +144,39 @@ export {
109144
useResolvedPath,
110145
useRoutes,
111146
useSearchParams,
147+
// New stuff from 6.4
148+
AbortedDeferredError,
149+
Await,
150+
RouterProvider,
151+
ScrollRestoration,
152+
createBrowserRouter,
153+
createHashRouter,
154+
createMemoryRouter,
155+
createRoutesFromElements,
156+
defer,
157+
isRouteErrorResponse,
158+
Form,
159+
json,
160+
redirect,
161+
useActionData,
162+
useAsyncError,
163+
useAsyncValue,
164+
useBeforeUnload,
165+
unstable_useBlocker,
166+
useFetcher,
167+
useFetchers,
168+
useFormAction,
169+
useLoaderData,
170+
useMatches,
171+
useNavigation,
172+
unstable_usePrompt,
173+
useRevalidator,
174+
useRouteError,
175+
useRouteLoaderData,
176+
useSubmit,
177+
UNSAFE_DataRouterContext,
178+
UNSAFE_DataRouterStateContext,
179+
UNSAFE_useScrollRestoration,
112180
} from "./react-router-dom";
113181

114182
export type { StaticRouterProps } from "./lib/components";

0 commit comments

Comments
 (0)