Skip to content

Commit 4c49cc6

Browse files
committed
Merge branch 'main' into release-next
2 parents 94f345a + 35718a3 commit 4c49cc6

21 files changed

+85
-89
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa
107107
- [Exposed Router Promises](#exposed-router-promises)
108108
- [Other Notable Changes](#other-notable-changes)
109109
- [`routes.ts`](#routests)
110-
- [Typesafety improvements](#typesafety-improvements)
110+
- [Type-safety improvements](#type-safety-improvements)
111111
- [Prerendering](#prerendering)
112112
- [Major Changes (`react-router`)](#major-changes-react-router)
113113
- [Major Changes (`@react-router/*`)](#major-changes-react-router-1)
@@ -416,8 +416,8 @@ For more information, check out the [blog post](https://remix.run/blog/react-rou
416416

417417
⚠️ _[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use_
418418

419-
- Add unstable RSC support ([#13700](https://github.com/remix-run/react-router/pull/13700))
420-
- For more information, see the [RSC documentation](https://reactrouter.com/start/rsc/installation)
419+
- Add unstable RSC support for Data Mode ([#13700](https://github.com/remix-run/react-router/pull/13700))
420+
- For more information, see the [RSC documentation](https://reactrouter.com/how-to/react-server-components)
421421

422422
### Changes by Package
423423

@@ -1947,7 +1947,7 @@ Also note that, if you were using Remix's `routes` option to define config-based
19471947
+];
19481948
```
19491949

1950-
#### Typesafety improvements
1950+
#### Type-safety improvements
19511951

19521952
React Router now generates types for each of your route modules and passes typed props to route module component exports ([#11961](https://github.com/remix-run/react-router/pull/11961), [#12019](https://github.com/remix-run/react-router/pull/12019)). You can access those types by importing them from `./+types/<route filename without extension>`.
19531953

contributors.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
- haivuw
138138
- hampelm
139139
- harshmangalam
140+
- HelpMe-Pls
140141
- HenriqueLimas
141142
- hernanif1
142143
- hi-ogawa
@@ -152,6 +153,7 @@
152153
- igniscyan
153154
- imjordanxd
154155
- infoxicator
156+
- ioNihal
155157
- IsaiStormBlesed
156158
- Isammoc
157159
- iskanderbroere

docs/api/framework-conventions/client-modules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ console.log(supportsVibrationAPI);
2626
// client: true | false
2727
```
2828

29+
<docs-info>
30+
31+
If you need more sophisticated control over what is included in the client/server bundles, check out the [`vite-env-only` plugin](https://github.com/pcattori/vite-env-only).
32+
33+
</docs-info>
34+
2935
## Usage Patterns
3036

3137
### Individual Files

docs/api/framework-conventions/server-modules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ export function validateToken(token: string) {
2121

2222
`.server` modules are a good way to explicitly mark entire modules as server-only. The build will fail if any code in a `.server` file or `.server` directory accidentally ends up in the client module graph.
2323

24+
<docs-info>
25+
26+
If you need more sophisticated control over what is included in the client/server bundles, check out the [`vite-env-only` plugin](https://github.com/pcattori/vite-env-only).
27+
28+
</docs-info>
29+
2430
## Usage Patterns
2531

2632
### Individual Files

docs/api/hooks/useOutletContext.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: useOutletContext
55
# useOutletContext
66

77
<!--
8-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
8+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
99
1010
Thank you for helping improve our documentation!
1111
@@ -94,10 +94,9 @@ export default function DashboardMessages() {
9494
## Signature
9595

9696
```tsx
97-
function useOutletContext<Context = unknown>(): Context
97+
function useOutletContext<Context = unknown>(): Context;
9898
```
9999

100100
## Returns
101101

102102
The context value passed to the parent [`Outlet`](../components/Outlet) component
103-

docs/api/rsc/RSCHydratedRouter.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ unstable: true
66
# unstable_RSCHydratedRouter
77

88
<!--
9-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
1010
1111
Thank you for helping improve our documentation!
1212
@@ -22,8 +22,8 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/rs
2222
<br />
2323
<br />
2424

25-
<docs-warning>This API is experimental and subject to breaking changes in
26-
minor/patch releases. Please use with caution and pay **very** close attention
25+
<docs-warning>This API is experimental and subject to breaking changes in
26+
minor/patch releases. Please use with caution and pay **very** close attention
2727
to release notes for relevant changes.</docs-warning>
2828

2929
## Summary
@@ -56,10 +56,10 @@ createFromReadableStream(getRSCStream()).then(
5656
</StrictMode>,
5757
{
5858
formState: await getFormState(payload),
59-
}
59+
},
6060
);
6161
});
62-
}
62+
},
6363
);
6464
```
6565

@@ -72,7 +72,7 @@ function RSCHydratedRouter({
7272
payload,
7373
routeDiscovery = "eager",
7474
unstable_getContext,
75-
}: RSCHydratedRouterProps)
75+
}: RSCHydratedRouterProps);
7676
```
7777

7878
## Props
@@ -84,7 +84,7 @@ used to decode payloads from the server.
8484

8585
### fetch
8686

87-
Optional fetch implementation. Defaults to global `fetch`.
87+
Optional fetch implementation. Defaults to global `fetch`.
8888

8989
### payload
9090

@@ -100,4 +100,3 @@ until clicked.
100100
A function that returns an `unstable_InitialContext` object
101101
(`Map<RouterContext, unknown>`), for use in client loaders, actions and
102102
middleware.
103-

docs/api/rsc/RSCStaticRouter.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ unstable: true
66
# unstable_RSCStaticRouter
77

88
<!--
9-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
1010
1111
Thank you for helping improve our documentation!
1212
@@ -22,8 +22,8 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/rs
2222
<br />
2323
<br />
2424

25-
<docs-warning>This API is experimental and subject to breaking changes in
26-
minor/patch releases. Please use with caution and pay **very** close attention
25+
<docs-warning>This API is experimental and subject to breaking changes in
26+
minor/patch releases. Please use with caution and pay **very** close attention
2727
to release notes for relevant changes.</docs-warning>
2828

2929
## Summary
@@ -53,7 +53,7 @@ routeRSCServerRequest({
5353
{
5454
bootstrapScriptContent,
5555
formState: await getFormState(payload),
56-
}
56+
},
5757
);
5858
},
5959
});
@@ -62,7 +62,9 @@ routeRSCServerRequest({
6262
## Signature
6363

6464
```tsx
65-
function RSCStaticRouter({ getPayload }: RSCStaticRouterProps)
65+
function RSCStaticRouter({
66+
getPayload,
67+
}: RSCStaticRouterProps);
6668
```
6769

6870
## Props
@@ -71,4 +73,3 @@ function RSCStaticRouter({ getPayload }: RSCStaticRouterProps)
7173

7274
A function that starts decoding of the `RSCPayload`. Usually passed through
7375
from `routeRSCServerRequest`'s `renderHTML`.
74-

docs/api/rsc/createCallServer.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ unstable: true
66
# unstable_createCallServer
77

88
<!--
9-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
1010
1111
Thank you for helping improve our documentation!
1212
@@ -22,8 +22,8 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/rs
2222
<br />
2323
<br />
2424

25-
<docs-warning>This API is experimental and subject to breaking changes in
26-
minor/patch releases. Please use with caution and pay **very** close attention
25+
<docs-warning>This API is experimental and subject to breaking changes in
26+
minor/patch releases. Please use with caution and pay **very** close attention
2727
to release notes for relevant changes.</docs-warning>
2828

2929
## Summary
@@ -46,7 +46,7 @@ setServerCallback(
4646
createFromReadableStream,
4747
createTemporaryReferenceSet,
4848
encodeReply,
49-
})
49+
}),
5050
);
5151
```
5252

@@ -63,7 +63,7 @@ function createCallServer({
6363
createTemporaryReferenceSet: () => unknown;
6464
encodeReply: EncodeReplyFunction;
6565
fetch?: (request: Request) => Promise<Response>;
66-
})
66+
});
6767
```
6868

6969
## Params
@@ -87,4 +87,3 @@ Optional fetch implementation. Defaults to global `fetch`.
8787
## Returns
8888

8989
A function that can be used to call server actions.
90-

docs/api/rsc/getRSCStream.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ unstable: true
66
# unstable_getRSCStream
77

88
<!--
9-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
1010
1111
Thank you for helping improve our documentation!
1212
@@ -22,8 +22,8 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/rs
2222
<br />
2323
<br />
2424

25-
<docs-warning>This API is experimental and subject to breaking changes in
26-
minor/patch releases. Please use with caution and pay **very** close attention
25+
<docs-warning>This API is experimental and subject to breaking changes in
26+
minor/patch releases. Please use with caution and pay **very** close attention
2727
to release notes for relevant changes.</docs-warning>
2828

2929
## Summary
@@ -62,10 +62,9 @@ createFromReadableStream(getRSCStream()).then(
6262
## Signature
6363

6464
```tsx
65-
function getRSCStream(): ReadableStream<any>
65+
function getRSCStream(): ReadableStream<any>;
6666
```
6767

6868
## Returns
6969

7070
A `ReadableStream` that contains the RSC data for hydration.
71-

docs/api/rsc/matchRSCServerRequest.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ unstable: true
66
# unstable_matchRSCServerRequest
77

88
<!--
9-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
1010
1111
Thank you for helping improve our documentation!
1212
@@ -22,8 +22,8 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/rs
2222
<br />
2323
<br />
2424

25-
<docs-warning>This API is experimental and subject to breaking changes in
26-
minor/patch releases. Please use with caution and pay **very** close attention
25+
<docs-warning>This API is experimental and subject to breaking changes in
26+
minor/patch releases. Please use with caution and pay **very** close attention
2727
to release notes for relevant changes.</docs-warning>
2828

2929
## Summary
@@ -57,7 +57,7 @@ matchRSCServerRequest({
5757
{
5858
status: match.statusCode,
5959
headers: match.headers,
60-
}
60+
},
6161
);
6262
},
6363
});
@@ -97,7 +97,7 @@ async function matchRSCServerRequest({
9797
temporaryReferences: unknown;
9898
},
9999
) => Response;
100-
}): Promise<Response>
100+
}): Promise<Response>;
101101
```
102102

103103
## Params
@@ -151,4 +151,3 @@ An optional error handler that will be called with any errors that occur during
151151
## Returns
152152

153153
A Response that contains the RSC data for hydration.
154-

0 commit comments

Comments
 (0)