Skip to content

Commit 49ea3c9

Browse files
committed
chore: generate markdown docs from jsdocs
1 parent a6a8886 commit 49ea3c9

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

docs/api/data-routers/createBrowserRouter.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ execute:
9595
let router = createBrowserRouter(routes, {
9696
async dataStrategy({ matches, request }) {
9797
const matchesToLoad = matches.filter((m) => m.shouldLoad);
98-
const results = {};
98+
const results: Record<string, DataStrategyResult> = {};
9999
await Promise.all(
100100
matchesToLoad.map(async (match) => {
101101
console.log(`Processing ${match.route.id}`);
@@ -237,8 +237,12 @@ Future flags to enable for the router.
237237

238238
### opts.unstable_getContext
239239

240-
Function to provide the initial `context` values for all client-side
241-
navigations/fetches
240+
A function that returns an [`unstable_RouterContextProvider`](../utils/RouterContextProvider) instance
241+
which is provided as the `context` argument to client
242+
[`action`](../../start/data/route-object#action)s,
243+
[`loader`](../../start/data/route-object#loader)s and
244+
[`middleware`](../../how-to/middleware)s. This function is called to
245+
generate a fresh `context` instance on each navigation or fetcher call.
242246

243247
### opts.hydrationData
244248

docs/api/data-routers/createHashRouter.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ Future flags to enable for the router.
5050

5151
### opts.unstable_getContext
5252

53-
Function to provide the initial `context` values for all client-side
54-
navigations/fetches
53+
A function that returns an [`unstable_RouterContextProvider`](../utils/RouterContextProvider) instance
54+
which is provided as the `context` argument to client
55+
[`action`](../../start/data/route-object#action)s,
56+
[`loader`](../../start/data/route-object#loader)s and
57+
[`middleware`](../../how-to/middleware)s. This function is called to
58+
generate a fresh `context` instance on each navigation or fetcher call.
5559

5660
### opts.hydrationData
5761

@@ -171,7 +175,7 @@ execute:
171175
let router = createBrowserRouter(routes, {
172176
async dataStrategy({ matches, request }) {
173177
const matchesToLoad = matches.filter((m) => m.shouldLoad);
174-
const results = {};
178+
const results: Record<string, DataStrategyResult> = {};
175179
await Promise.all(
176180
matchesToLoad.map(async (match) => {
177181
console.log(`Processing ${match.route.id}`);

docs/api/rsc/RSCHydratedRouter.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,12 @@ Optional fetch implementation. Defaults to global [`fetch`](https://developer.mo
8282

8383
### unstable_getContext
8484

85-
A function that returns an [`unstable_InitialContext`](https://api.reactrouter.com/v7/types/react_router.unstable_InitialContext.html) object
86-
(`Map<RouterContext, unknown>`), for use in client [`action`](../../start/data/route-object#action)s,
87-
[`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
85+
A function that returns an [`unstable_RouterContextProvider`](../utils/RouterContextProvider) instance
86+
which is provided as the `context` argument to client
87+
[`action`](../../start/data/route-object#action)s,
88+
[`loader`](../../start/data/route-object#loader)s and
89+
[`middleware`](../../how-to/middleware)s. This function is called to
90+
generate a fresh `context` instance on each navigation or fetcher call.
8891

8992
### payload
9093

docs/api/rsc/matchRSCServerRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) to mat
147147

148148
### opts.requestContext
149149

150-
An instance of [`unstable_RouterContextProvider`](https://api.reactrouter.com/v7/classes/react_router.unstable_RouterContextProvider.html) that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
150+
An instance of [`unstable_RouterContextProvider`](../utils/RouterContextProvider) that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
151151
[`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
152152

153153
### opts.routes

0 commit comments

Comments
 (0)