Skip to content

Commit 7239a5d

Browse files
committed
Update to unstable to follow OG process
1 parent b9c05f0 commit 7239a5d

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

docs/api/components/AbsoluteRoutes.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
title: AbsoluteRoutes
2+
title: unstable_AbsoluteRoutes
33
---
44

5-
# AbsoluteRoutes
5+
# unstable_AbsoluteRoutes
66

77
[MODES: framework, data, declarative]
88

99
## Summary
1010

11-
[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.AbsoluteRoutes.html)
11+
[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.unstable_AbsoluteRoutes.html)
1212

1313
An alternate version of [<Routes>](./Routes) that expects absolute paths on routes instead of relative paths. This is mostly intended to be used as a tool to help migrate from v5 where absolute paths were a common pattern, or for when you want to define your paths in a separate data structure using absolute paths.
1414

1515
```tsx
16-
import { AbsoluteRoutes, Route } from "react-router";
16+
import {
17+
unstable_AbsoluteRoutes as AbsoluteRoutes,
18+
Route,
19+
} from "react-router";
1720

1821
<AbsoluteRoutes>
1922
<Route path="/dashboard/*" element={<Dashboard />} />

docs/api/hooks/useAbsoluteRoutes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: useAbsoluteRoutes
2+
title: unstable_useAbsoluteRoutes
33
---
44

5-
# useAbsoluteRoutes
5+
# unstable_useAbsoluteRoutes
66

77
[MODES: framework, data, declarative]
88

99
## Summary
1010

11-
[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useAbsoluteRoutes.html)
11+
[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.unstable_useAbsoluteRoutes.html)
1212

1313
An alternate version of [useRoutes](./useRoutes) that expects absolute paths on routes instead of relative paths. This is mostly intended to be used as a tool to help migrate from v5 where absolute paths were a common pattern, or for when you want to define your paths in a separate data structure using absolute paths. This hook expects absolute paths both when used at the top level of your application, or within a set of descendant routes inside a splat route.
1414

15-
The return value of `useAbsoluteRoutes` is either a valid React element you can use to render the route tree, or `null` if nothing matched.
15+
The return value of `unstable_useAbsoluteRoutes` is either a valid React element you can use to render the route tree, or `null` if nothing matched.
1616

1717
```tsx
1818
import * as React from "react";
19-
import { useAbsoluteRoutes } from "react-router";
19+
import { unstable_useAbsoluteRoutes as useAbsoluteRoutes } from "react-router";
2020

2121
const routes = {
2222
dashboard: {
@@ -60,7 +60,7 @@ function App() {
6060
## Signature
6161

6262
```tsx
63-
useAbsoluteRoutes(routes, locationArg): undefined
63+
unstable_useAbsoluteRoutes(routes, locationArg): undefined
6464
```
6565

6666
## Params

packages/react-router/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export type {
8989
RouteObject,
9090
} from "./lib/context";
9191
export type {
92-
AbsoluteRoutesProps,
92+
AbsoluteRoutesProps as unstable_AbsoluteRoutesProps,
9393
AwaitProps,
9494
IndexRouteProps,
9595
LayoutRouteProps,
@@ -104,7 +104,7 @@ export type {
104104
RoutesProps,
105105
} from "./lib/components";
106106
export {
107-
AbsoluteRoutes,
107+
AbsoluteRoutes as unstable_AbsoluteRoutes,
108108
Await,
109109
MemoryRouter,
110110
Navigate,
@@ -120,7 +120,7 @@ export {
120120
} from "./lib/components";
121121
export type { NavigateFunction } from "./lib/hooks";
122122
export {
123-
useAbsoluteRoutes,
123+
useAbsoluteRoutes as unstable_useAbsoluteRoutes,
124124
useBlocker,
125125
useActionData,
126126
useAsyncError,

0 commit comments

Comments
 (0)