Skip to content

Commit fbf037a

Browse files
committed
chore: generate markdown docs from jsdocs
1 parent 135e447 commit fbf037a

File tree

8 files changed

+46
-50
lines changed

8 files changed

+46
-50
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
@@ -94,9 +94,10 @@ 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: 8 additions & 7 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,3 +100,4 @@ 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: 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 `RSCPayload`. Usually passed through
7573
from `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
@@ -87,3 +87,4 @@ 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: 5 additions & 4 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,9 +62,10 @@ 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: 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
@@ -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,3 +151,4 @@ 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+

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
@@ -54,7 +54,7 @@ routeRSCServerRequest({
5454
{
5555
bootstrapScriptContent,
5656
formState: await getFormState(payload),
57-
},
57+
}
5858
);
5959
},
6060
});
@@ -75,11 +75,9 @@ async function routeRSCServerRequest({
7575
createFromReadableStream: SSRCreateFromReadableStreamFunction;
7676
renderHTML: (
7777
getPayload: () => Promise<RSCPayload>,
78-
) =>
79-
| ReadableStream<Uint8Array>
80-
| Promise<ReadableStream<Uint8Array>>;
78+
) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;
8179
hydrate?: boolean;
82-
}): Promise<Response>;
80+
}): Promise<Response>
8381
```
8482

8583
## Params
@@ -108,3 +106,4 @@ Whether to hydrate the server response with the RSC payload. Defaults to `true`.
108106

109107
A `Response` that either contains the RSC payload for data requests, or
110108
renders the HTML for document requests.
109+

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)