Skip to content

Commit 0279b53

Browse files
committed
chore: generate markdown docs from jsdocs
1 parent 243f788 commit 0279b53

File tree

8 files changed

+58
-68
lines changed

8 files changed

+58
-68
lines changed

docs/api/hooks/useOutletContext.md

Lines changed: 3 additions & 2 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
@@ -96,9 +96,10 @@ export default function DashboardMessages() {
9696
## Signature
9797

9898
```tsx
99-
function useOutletContext<Context = unknown>(): Context;
99+
function useOutletContext<Context = unknown>(): Context
100100
```
101101

102102
## Returns
103103

104104
The context value passed to the parent [`Outlet`](../components/Outlet) component
105+

docs/api/rsc/RSCHydratedRouter.md

Lines changed: 18 additions & 23 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
@@ -41,25 +41,19 @@ import {
4141
} from "react-router";
4242
import type { unstable_RSCPayload as RSCPayload } from "react-router";
4343

44-
createFromReadableStream(getRSCStream()).then(
45-
(payload: RSCServerPayload) => {
46-
startTransition(async () => {
47-
hydrateRoot(
48-
document,
49-
<StrictMode>
50-
<RSCHydratedRouter
51-
createFromReadableStream={
52-
createFromReadableStream
53-
}
54-
payload={payload}
55-
/>
56-
</StrictMode>,
57-
{
58-
formState: await getFormState(payload),
59-
},
60-
);
61-
});
62-
},
44+
createFromReadableStream(getRSCStream()).then((payload) =>
45+
startTransition(async () => {
46+
hydrateRoot(
47+
document,
48+
<StrictMode>
49+
<RSCHydratedRouter
50+
createFromReadableStream={createFromReadableStream}
51+
payload={payload}
52+
/>
53+
</StrictMode>,
54+
{ formState: await getFormState(payload) },
55+
);
56+
}),
6357
);
6458
```
6559

@@ -72,7 +66,7 @@ function RSCHydratedRouter({
7266
payload,
7367
routeDiscovery = "eager",
7468
unstable_getContext,
75-
}: RSCHydratedRouterProps);
69+
}: RSCHydratedRouterProps)
7670
```
7771

7872
## Props
@@ -100,3 +94,4 @@ The decoded [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_r
10094

10195
`"eager"` or `"lazy"` - Determines if links are eagerly discovered, or
10296
delayed until clicked.
97+

docs/api/rsc/RSCStaticRouter.md

Lines changed: 6 additions & 7 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,9 +62,7 @@ routeRSCServerRequest({
6262
## Signature
6363

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

7068
## Props
@@ -73,3 +71,4 @@ function RSCStaticRouter({
7371

7472
A function that starts decoding of the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html). Usually passed
7573
through from [`unstable_routeRSCServerRequest`](../rsc/routeRSCServerRequest)'s `renderHTML`.
74+

docs/api/rsc/createCallServer.md

Lines changed: 6 additions & 5 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
@@ -88,3 +88,4 @@ Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
8888
## Returns
8989

9090
A function that can be used to call server actions.
91+

docs/api/rsc/getRSCStream.md

Lines changed: 7 additions & 6 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
@@ -53,21 +53,22 @@ createFromReadableStream(getRSCStream()).then(
5353
</StrictMode>,
5454
{
5555
// Options
56-
},
56+
}
5757
);
5858
});
59-
},
59+
}
6060
);
6161
```
6262

6363
## Signature
6464

6565
```tsx
66-
function getRSCStream(): ReadableStream<any>;
66+
function getRSCStream(): ReadableStream
6767
```
6868

6969
## Returns
7070

7171
A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
7272
that contains the [RSC](https://react.dev/reference/rsc/server-components)
7373
data for hydration.
74+

docs/api/rsc/matchRSCServerRequest.md

Lines changed: 6 additions & 5 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
@@ -60,7 +60,7 @@ matchRSCServerRequest({
6060
{
6161
status: match.statusCode,
6262
headers: match.headers,
63-
},
63+
}
6464
);
6565
},
6666
});
@@ -100,7 +100,7 @@ async function matchRSCServerRequest({
100100
temporaryReferences: unknown;
101101
},
102102
) => Response;
103-
}): Promise<Response>;
103+
}): Promise<Response>
104104
```
105105

106106
## Params
@@ -159,3 +159,4 @@ Your [route definitions](https://api.reactrouter.com/v7/types/react_router.unsta
159159
A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
160160
that contains the [RSC](https://react.dev/reference/rsc/server-components)
161161
data for hydration.
162+

docs/api/rsc/routeRSCServerRequest.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ unstable: true
66
# unstable_routeRSCServerRequest
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
@@ -55,7 +55,7 @@ routeRSCServerRequest({
5555
{
5656
bootstrapScriptContent,
5757
formState: await getFormState(payload),
58-
},
58+
}
5959
);
6060
},
6161
});
@@ -76,11 +76,9 @@ async function routeRSCServerRequest({
7676
createFromReadableStream: SSRCreateFromReadableStreamFunction;
7777
renderHTML: (
7878
getPayload: () => Promise<RSCPayload>,
79-
) =>
80-
| ReadableStream<Uint8Array>
81-
| Promise<ReadableStream<Uint8Array>>;
79+
) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;
8280
hydrate?: boolean;
83-
}): Promise<Response>;
81+
}): Promise<Response>
8482
```
8583

8684
## Params
@@ -111,3 +109,4 @@ The request to route.
111109
A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
112110
that either contains the [RSC](https://react.dev/reference/rsc/server-components)
113111
payload for data requests, or renders the HTML for document requests.
112+

docs/api/utils/createRoutesFromElements.md

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

77
<!--
8-
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
8+
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
99
1010
Thank you for helping improve our documentation!
1111
@@ -28,17 +28,9 @@ Create route objects from JSX elements instead of arrays of objects.
2828
const routes = createRoutesFromElements(
2929
<>
3030
<Route index loader={step1Loader} Component={StepOne} />
31-
<Route
32-
path="step-2"
33-
loader={step2Loader}
34-
Component={StepTwo}
35-
/>
36-
<Route
37-
path="step-3"
38-
loader={step3Loader}
39-
Component={StepThree}
40-
/>
41-
</>,
31+
<Route path="step-2" loader={step2Loader} Component={StepTwo} />
32+
<Route path="step-3" loader={step3Loader} Component={StepThree} />
33+
</>
4234
);
4335

4436
const router = createBrowserRouter(routes);
@@ -62,3 +54,4 @@ application developer.
6254
## Returns
6355

6456
An array of [`RouteObject`](https://api.reactrouter.com/v7/types/react_router.RouteObject.html)s that can be used with a [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html)
57+

0 commit comments

Comments
 (0)