Skip to content

Commit 49295b5

Browse files
authored
Stabilize APIs (#14999)
1 parent 51a79a4 commit 49295b5

86 files changed

Lines changed: 667 additions & 642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

decisions/0015-observability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ let unInstrumentedHandler = createRequestHandler({
234234
...m.entry,
235235
module: {
236236
...m.entry.module,
237-
unstable_instrumentations: undefined,
237+
instrumentations: undefined,
238238
},
239239
},
240240
})),

docs/api/components/Form.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Enables a [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/Vie
144144
for this navigation. To apply specific styles during the transition, see
145145
[`useViewTransitionState`](../hooks/useViewTransitionState).
146146

147-
### unstable_defaultShouldRevalidate
147+
### defaultShouldRevalidate
148148

149149
Specify the default revalidation behavior after this submission
150150

docs/api/components/Link.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,14 @@ for this navigation.
214214

215215
To apply specific styles for the transition, see [`useViewTransitionState`](../hooks/useViewTransitionState)
216216

217-
### unstable_defaultShouldRevalidate
217+
### defaultShouldRevalidate
218218

219219
[modes: framework, data, declarative]
220220

221221
Specify the default revalidation behavior for the navigation.
222222

223223
```tsx
224-
<Link to="/some/path" unstable_defaultShouldRevalidate={false} />
224+
<Link to="/some/path" defaultShouldRevalidate={false} />
225225
```
226226

227227
If no `shouldRevalidate` functions are present on the active routes, then this
@@ -232,7 +232,7 @@ useful when updating search params and you don't want to trigger a revalidation.
232232
By default (when not specified), loaders will revalidate according to the routers
233233
standard revalidation behavior.
234234

235-
### unstable_mask
235+
### mask
236236

237237
[modes: framework, data]
238238

@@ -265,7 +265,7 @@ export default function Gallery({ loaderData }: Route.ComponentProps) {
265265
<Link
266266
key={image.id}
267267
to={`/gallery?image=${image.id}`}
268-
unstable_mask={`/images/${image.id}`}
268+
mask={`/images/${image.id}`}
269269
>
270270
<img src={image.url} alt={image.alt} />
271271
</Link>

docs/api/data-routers/RouterProvider.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function RouterProvider({
4949
router,
5050
flushSync: reactDomFlushSyncImpl,
5151
onError,
52-
unstable_useTransitions,
52+
useTransitions,
5353
}: RouterProviderProps): React.ReactElement
5454
```
5555

@@ -78,7 +78,7 @@ and is only present for render errors.
7878

7979
```tsx
8080
<RouterProvider onError=(error, info) => {
81-
let { location, params, unstable_pattern, errorInfo } = info;
81+
let { location, params, pattern, errorInfo } = info;
8282
console.error(error, location, errorInfo);
8383
reportToErrorService(error, location, errorInfo);
8484
}} />
@@ -88,7 +88,7 @@ and is only present for render errors.
8888

8989
The [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) instance to use for navigation and data fetching.
9090

91-
### unstable_useTransitions
91+
### useTransitions
9292

9393
Control whether router state updates are internally wrapped in
9494
[`React.startTransition`](https://react.dev/reference/react/startTransition).

docs/api/data-routers/createBrowserRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ const router = createBrowserRouter(
172172
);
173173
```
174174

175-
### opts.unstable_instrumentations
175+
### opts.instrumentations
176176

177177
Array of instrumentation objects allowing you to instrument the router and
178178
individual routes prior to router initialization (and on any subsequently
@@ -183,7 +183,7 @@ tracing. See the [docs](../../how-to/instrumentation) for more information.
183183

184184
```tsx
185185
let router = createBrowserRouter(routes, {
186-
unstable_instrumentations: [logging]
186+
instrumentations: [logging]
187187
});
188188
189189

docs/api/data-routers/createHashRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const router = createBrowserRouter(
142142
);
143143
```
144144

145-
### opts.unstable_instrumentations
145+
### opts.instrumentations
146146

147147
Array of instrumentation objects allowing you to instrument the router and
148148
individual routes prior to router initialization (and on any subsequently
@@ -153,7 +153,7 @@ tracing. See the [docs](../../how-to/instrumentation) for more information.
153153

154154
```tsx
155155
let router = createBrowserRouter(routes, {
156-
unstable_instrumentations: [logging]
156+
instrumentations: [logging]
157157
});
158158
159159

docs/api/data-routers/createMemoryRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Initial entries in the in-memory history stack
9999

100100
Index of `initialEntries` the application should initialize to
101101

102-
### opts.unstable_instrumentations
102+
### opts.instrumentations
103103

104104
Array of instrumentation objects allowing you to instrument the router and
105105
individual routes prior to router initialization (and on any subsequently
@@ -110,7 +110,7 @@ tracing. See the [docs](../../how-to/instrumentation) for more information.
110110

111111
```tsx
112112
let router = createBrowserRouter(routes, {
113-
unstable_instrumentations: [logging]
113+
instrumentations: [logging]
114114
});
115115
116116

docs/api/declarative-routers/BrowserRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ API for client-side routing.
3131
function BrowserRouter({
3232
basename,
3333
children,
34-
unstable_useTransitions,
34+
useTransitions,
3535
window,
3636
}: BrowserRouterProps)
3737
```
@@ -46,7 +46,7 @@ Application basename
4646

4747
``<Route>`` components describing your route configuration
4848

49-
### unstable_useTransitions
49+
### useTransitions
5050

5151
Control whether router state updates are internally wrapped in
5252
[`React.startTransition`](https://react.dev/reference/react/startTransition).

docs/api/declarative-routers/HashRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ of the URL so it is not sent to the server.
3232
function HashRouter({
3333
basename,
3434
children,
35-
unstable_useTransitions,
35+
useTransitions,
3636
window,
3737
}: HashRouterProps)
3838
```
@@ -47,7 +47,7 @@ Application basename
4747

4848
``<Route>`` components describing your route configuration
4949

50-
### unstable_useTransitions
50+
### useTransitions
5151

5252
Control whether router state updates are internally wrapped in
5353
[`React.startTransition`](https://react.dev/reference/react/startTransition).

docs/api/declarative-routers/HistoryRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function HistoryRouter({
4343
basename,
4444
children,
4545
history,
46-
unstable_useTransitions,
46+
useTransitions,
4747
}: HistoryRouterProps)
4848
```
4949

@@ -61,7 +61,7 @@ Application basename
6161

6262
A `History` implementation for use by the router
6363

64-
### unstable_useTransitions
64+
### useTransitions
6565

6666
Control whether router state updates are internally wrapped in
6767
[`React.startTransition`](https://react.dev/reference/react/startTransition).

0 commit comments

Comments
 (0)