Skip to content

Commit 447561e

Browse files
committed
Merge branch 'dev' into fix/relative-route-ids
2 parents e568b37 + 353d05f commit 447561e

File tree

151 files changed

+4251
-5645
lines changed

Some content is hidden

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

151 files changed

+4251
-5645
lines changed

.changeset/cool-readers-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
Add react-server Await component implementation

.changeset/flat-shoes-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
In RSC Data Mode when using a custom basename, fix hydration errors for routes that only have client loaders

.changeset/khaki-dogs-rescue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
Make `href` function available in a react-server context

.changeset/shiny-hotels-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
decode each time `getPayload()` is called to allow for "in-context" decoding and hoisting of contextual assets

.changeset/shy-lemons-boil.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@react-router/cloudflare": minor
3+
"@react-router/architect": minor
4+
"@react-router/express": minor
5+
"@react-router/node": minor
6+
"@react-router/dev": minor
7+
"react-router": minor
8+
---
9+
10+
Stabilize middleware and context APIs.
11+
12+
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
13+
14+
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
15+
- [`createContext`](https://reactrouter.com/api/utils/createContext)
16+
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
17+
- `<HydratedRouter>` [`getContext`](https://reactrouter.com/api/framework-routers/HydratedRouter#getcontext) prop
18+
19+
Please see the [Middleware Docs](https://reactrouter.com/how-to/middleware), the [Middleware RFC](https://github.com/remix-run/remix/discussions/7642), and the [Client-side Context RFC](https://github.com/remix-run/react-router/discussions/9856) for more information.

.changeset/slow-readers-thank.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
`href()` now correctly processes routes that have an extension after the parameter or are a single optional parameter.

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@
427427
- willsmithte
428428
- Willvillegas
429429
- wkovacs64
430+
- wobsoriano
430431
- woodywoodsta
431432
- xavier-lc
432433
- xcsnowcity

docs/api/data-routers/createBrowserRouter.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,25 +235,25 @@ let router = createBrowserRouter(routes, {
235235

236236
Future flags to enable for the router.
237237

238-
### opts.unstable_getContext
238+
### opts.getContext
239239

240-
A function that returns an [`unstable_RouterContextProvider`](../utils/RouterContextProvider) instance
240+
A function that returns an [`RouterContextProvider`](../utils/RouterContextProvider) instance
241241
which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
242242
[`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
243243
This function is called to generate a fresh `context` instance on each
244244
navigation or fetcher call.
245245

246246
```tsx
247247
import {
248-
unstable_createContext,
249-
unstable_RouterContextProvider,
248+
createContext,
249+
RouterContextProvider,
250250
} from "react-router";
251251

252-
const apiClientContext = unstable_createContext<APIClient>();
252+
const apiClientContext = createContext<APIClient>();
253253

254254
function createBrowserRouter(routes, {
255-
unstable_getContext() {
256-
let context = new unstable_RouterContextProvider();
255+
getContext() {
256+
let context = new RouterContextProvider();
257257
context.set(apiClientContext, getApiClient());
258258
return context;
259259
}

docs/api/data-routers/createHashRouter.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,25 @@ Basename path for the application.
4848

4949
Future flags to enable for the router.
5050

51-
### opts.unstable_getContext
51+
### opts.getContext
5252

53-
A function that returns an [`unstable_RouterContextProvider`](../utils/RouterContextProvider) instance
53+
A function that returns an [`RouterContextProvider`](../utils/RouterContextProvider) instance
5454
which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
5555
[`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
5656
This function is called to generate a fresh `context` instance on each
5757
navigation or fetcher call.
5858

5959
```tsx
6060
import {
61-
unstable_createContext,
62-
unstable_RouterContextProvider,
61+
createContext,
62+
RouterContextProvider,
6363
} from "react-router";
6464
65-
const apiClientContext = unstable_createContext<APIClient>();
65+
const apiClientContext = createContext<APIClient>();
6666
6767
function createBrowserRouter(routes, {
68-
unstable_getContext() {
69-
let context = new unstable_RouterContextProvider();
68+
getContext() {
69+
let context = new RouterContextProvider();
7070
context.set(apiClientContext, getApiClient());
7171
return context;
7272
}

docs/api/data-routers/createMemoryRouter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Only intended for advanced usage.
5454

5555
Future flags to enable for the router.
5656

57-
### opts.unstable_getContext
57+
### opts.getContext
5858

59-
A function that returns an [`unstable_RouterContextProvider`](../utils/RouterContextProvider) instance
59+
A function that returns an [`RouterContextProvider`](../utils/RouterContextProvider) instance
6060
which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
6161
[`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
6262
This function is called to generate a fresh `context` instance on each

0 commit comments

Comments
 (0)