react-router 0.0.0-experimental-426e5caec → 0.0.0-experimental-7ed11be
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -24
- package/dist/{production/chunk-DZS627TW.mjs → development/chunk-2OYLVAZB.mjs} +102 -56
- package/dist/development/{chunk-KCPD675I.js → chunk-BELBAVMB.js} +93 -84
- package/dist/development/{chunk-5HELVQDL.mjs → chunk-MUVPFEOF.mjs} +59 -45
- package/dist/{production/chunk-TC5SCO6O.js → development/chunk-X5OYM2ET.js} +141 -136
- package/dist/development/{context-EwD9faH7.d.mts → context-CRZ6DK7I.d.mts} +43 -34
- package/dist/development/dom-export.d.mts +3 -3
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +7 -7
- package/dist/development/dom-export.mjs +7 -7
- package/dist/{production/index-react-server-client-CjrUmqhw.d.ts → development/index-react-server-client-DM3R9ovf.d.ts} +50 -34
- package/dist/development/{index-react-server-client-DDdP8ud2.d.mts → index-react-server-client-DbUtZHNh.d.mts} +51 -35
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +47 -38
- package/dist/development/index-react-server.d.ts +47 -38
- package/dist/development/index-react-server.js +32 -45
- package/dist/development/index-react-server.mjs +31 -44
- package/dist/development/index.d.mts +15 -15
- package/dist/development/index.d.ts +13 -13
- package/dist/development/index.js +184 -138
- package/dist/development/index.mjs +7 -7
- package/dist/development/lib/types/internal.d.mts +6 -6
- package/dist/development/lib/types/internal.d.ts +5 -5
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-CAnRKu1U.d.mts → route-data-gwXJPIqL.d.mts} +12 -12
- package/dist/{production/routeModules-CQWjJ9NX.d.ts → development/routeModules-Dz64j-T-.d.ts} +54 -45
- package/dist/{development/chunk-ZOYSFAC5.mjs → production/chunk-7A6GBCQS.mjs} +102 -56
- package/dist/production/{chunk-NLCKEFES.js → chunk-A4J35SEJ.js} +93 -84
- package/dist/production/{chunk-5W7O3ZZ2.mjs → chunk-IC5TORKA.mjs} +59 -45
- package/dist/{development/chunk-KPVSYEOF.js → production/chunk-W6BB3ISI.js} +141 -136
- package/dist/production/{context-EwD9faH7.d.mts → context-CRZ6DK7I.d.mts} +43 -34
- package/dist/production/dom-export.d.mts +3 -3
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +7 -7
- package/dist/production/dom-export.mjs +7 -7
- package/dist/{development/index-react-server-client-CjrUmqhw.d.ts → production/index-react-server-client-DM3R9ovf.d.ts} +50 -34
- package/dist/production/{index-react-server-client-DDdP8ud2.d.mts → index-react-server-client-DbUtZHNh.d.mts} +51 -35
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +47 -38
- package/dist/production/index-react-server.d.ts +47 -38
- package/dist/production/index-react-server.js +32 -45
- package/dist/production/index-react-server.mjs +31 -44
- package/dist/production/index.d.mts +15 -15
- package/dist/production/index.d.ts +13 -13
- package/dist/production/index.js +184 -138
- package/dist/production/index.mjs +7 -7
- package/dist/production/lib/types/internal.d.mts +6 -6
- package/dist/production/lib/types/internal.d.ts +5 -5
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-CAnRKu1U.d.mts → route-data-gwXJPIqL.d.mts} +12 -12
- package/dist/{development/routeModules-CQWjJ9NX.d.ts → production/routeModules-Dz64j-T-.d.ts} +54 -45
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
-
## 7.8.2
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- \[UNSTABLE] Remove Data Mode `future.unstable_middleware` flag from `createBrowserRouter` ([#14213](https://github.com/remix-run/react-router/pull/14213))
|
|
8
|
-
- This is only needed as a Framework Mode flag because of the route modules and the `getLoadContext` type behavior change
|
|
9
|
-
- In Data Mode, it's an opt-in feature because it's just a new property on a route object, so there's no behavior changes that necessitate a flag
|
|
10
|
-
|
|
11
|
-
- \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
|
|
12
|
-
|
|
13
|
-
- server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
|
|
14
|
-
|
|
15
|
-
- Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
|
|
16
|
-
|
|
17
|
-
- Maintain `ReadonlyMap` and `ReadonlySet` types in server response data. ([#13092](https://github.com/remix-run/react-router/pull/13092))
|
|
18
|
-
|
|
19
|
-
- \[UNSTABLE] Delay serialization of `.data` redirects to 202 responses until after middleware chain ([#14205](https://github.com/remix-run/react-router/pull/14205))
|
|
20
|
-
|
|
21
|
-
- Fix `TypeError` if you throw from `patchRoutesOnNavigation` when no partial matches exist ([#14198](https://github.com/remix-run/react-router/pull/14198))
|
|
22
|
-
|
|
23
|
-
- Fix `basename` usage without a leading slash in data routers ([#11671](https://github.com/remix-run/react-router/pull/11671))
|
|
24
|
-
|
|
25
|
-
- \[UNSTABLE] Update client middleware so it returns the data strategy results allowing for more advanced post-processing middleware ([#14151](https://github.com/remix-run/react-router/pull/14151))
|
|
26
|
-
|
|
27
3
|
## 7.8.1
|
|
28
4
|
|
|
29
5
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-7ed11be
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
Outlet,
|
|
17
17
|
RSCRouterContext,
|
|
18
18
|
RemixErrorBoundary,
|
|
19
|
-
RouterContextProvider,
|
|
20
19
|
RouterProvider,
|
|
21
20
|
SINGLE_FETCH_REDIRECT_STATUS,
|
|
22
21
|
SingleFetchRedirectSymbol,
|
|
@@ -24,7 +23,6 @@ import {
|
|
|
24
23
|
StreamTransfer,
|
|
25
24
|
convertRoutesToDataRoutes,
|
|
26
25
|
createBrowserHistory,
|
|
27
|
-
createContext,
|
|
28
26
|
createMemoryRouter,
|
|
29
27
|
createRequestInit,
|
|
30
28
|
createRouter,
|
|
@@ -53,12 +51,14 @@ import {
|
|
|
53
51
|
singleFetchUrl,
|
|
54
52
|
stripBasename,
|
|
55
53
|
stripIndexParam,
|
|
54
|
+
unstable_RouterContextProvider,
|
|
55
|
+
unstable_createContext,
|
|
56
56
|
useRouteError,
|
|
57
57
|
warnOnce,
|
|
58
58
|
withComponentProps,
|
|
59
59
|
withErrorBoundaryProps,
|
|
60
60
|
withHydrateFallbackProps
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-MUVPFEOF.mjs";
|
|
62
62
|
|
|
63
63
|
// lib/dom/ssr/server.tsx
|
|
64
64
|
import * as React from "react";
|
|
@@ -145,7 +145,7 @@ function createRoutesStub(routes, _context) {
|
|
|
145
145
|
frameworkContextRef.current = {
|
|
146
146
|
future: {
|
|
147
147
|
unstable_subResourceIntegrity: future?.unstable_subResourceIntegrity === true,
|
|
148
|
-
|
|
148
|
+
unstable_middleware: future?.unstable_middleware === true
|
|
149
149
|
},
|
|
150
150
|
manifest: {
|
|
151
151
|
routes: {},
|
|
@@ -162,7 +162,7 @@ function createRoutesStub(routes, _context) {
|
|
|
162
162
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
163
163
|
// types compared to `AgnosticRouteObject`
|
|
164
164
|
convertRoutesToDataRoutes(routes, (r) => r),
|
|
165
|
-
_context !== void 0 ? _context : future?.
|
|
165
|
+
_context !== void 0 ? _context : future?.unstable_middleware ? new unstable_RouterContextProvider() : {},
|
|
166
166
|
frameworkContextRef.current.manifest,
|
|
167
167
|
frameworkContextRef.current.routeModules
|
|
168
168
|
);
|
|
@@ -612,7 +612,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
612
612
|
hasErrorBoundary: route.id === "root" || route.module.ErrorBoundary != null,
|
|
613
613
|
id: route.id,
|
|
614
614
|
path: route.path,
|
|
615
|
-
|
|
615
|
+
unstable_middleware: route.module.unstable_middleware,
|
|
616
616
|
// Need to use RR's version in the param typed here to permit the optional
|
|
617
617
|
// context even though we know it'll always be provided in remix
|
|
618
618
|
loader: route.module.loader ? async (args) => {
|
|
@@ -785,7 +785,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
785
785
|
requestContext: loadContext,
|
|
786
786
|
skipLoaderErrorBubbling: true,
|
|
787
787
|
skipRevalidation: true,
|
|
788
|
-
|
|
788
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
789
789
|
try {
|
|
790
790
|
let innerResult = await query(handlerRequest);
|
|
791
791
|
return handleQueryResult(innerResult);
|
|
@@ -799,7 +799,21 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
799
799
|
return handleQueryError(error);
|
|
800
800
|
}
|
|
801
801
|
function handleQueryResult(result) {
|
|
802
|
-
|
|
802
|
+
if (!isResponse(result)) {
|
|
803
|
+
result = staticContextToResponse(result);
|
|
804
|
+
}
|
|
805
|
+
if (isRedirectResponse(result)) {
|
|
806
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
807
|
+
result: getSingleFetchRedirect(
|
|
808
|
+
result.status,
|
|
809
|
+
result.headers,
|
|
810
|
+
build.basename
|
|
811
|
+
),
|
|
812
|
+
headers: result.headers,
|
|
813
|
+
status: SINGLE_FETCH_REDIRECT_STATUS
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
return result;
|
|
803
817
|
}
|
|
804
818
|
function handleQueryError(error) {
|
|
805
819
|
handleError(error);
|
|
@@ -812,7 +826,15 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
812
826
|
function staticContextToResponse(context) {
|
|
813
827
|
let headers = getDocumentHeaders(context, build);
|
|
814
828
|
if (isRedirectStatusCode(context.statusCode) && headers.has("Location")) {
|
|
815
|
-
return
|
|
829
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
830
|
+
result: getSingleFetchRedirect(
|
|
831
|
+
context.statusCode,
|
|
832
|
+
headers,
|
|
833
|
+
build.basename
|
|
834
|
+
),
|
|
835
|
+
headers,
|
|
836
|
+
status: SINGLE_FETCH_REDIRECT_STATUS
|
|
837
|
+
});
|
|
816
838
|
}
|
|
817
839
|
if (context.errors) {
|
|
818
840
|
Object.values(context.errors).forEach((err) => {
|
|
@@ -849,7 +871,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
849
871
|
requestContext: loadContext,
|
|
850
872
|
filterMatchesToLoad: (m) => !loadRouteIds || loadRouteIds.has(m.route.id),
|
|
851
873
|
skipLoaderErrorBubbling: true,
|
|
852
|
-
|
|
874
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
853
875
|
try {
|
|
854
876
|
let innerResult = await query(handlerRequest);
|
|
855
877
|
return handleQueryResult(innerResult);
|
|
@@ -863,7 +885,21 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
863
885
|
return handleQueryError(error);
|
|
864
886
|
}
|
|
865
887
|
function handleQueryResult(result) {
|
|
866
|
-
|
|
888
|
+
let response = isResponse(result) ? result : staticContextToResponse(result);
|
|
889
|
+
if (isRedirectResponse(response)) {
|
|
890
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
891
|
+
result: {
|
|
892
|
+
[SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
893
|
+
response.status,
|
|
894
|
+
response.headers,
|
|
895
|
+
build.basename
|
|
896
|
+
)
|
|
897
|
+
},
|
|
898
|
+
headers: response.headers,
|
|
899
|
+
status: SINGLE_FETCH_REDIRECT_STATUS
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
return response;
|
|
867
903
|
}
|
|
868
904
|
function handleQueryError(error) {
|
|
869
905
|
handleError(error);
|
|
@@ -876,7 +912,17 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
876
912
|
function staticContextToResponse(context) {
|
|
877
913
|
let headers = getDocumentHeaders(context, build);
|
|
878
914
|
if (isRedirectStatusCode(context.statusCode) && headers.has("Location")) {
|
|
879
|
-
return
|
|
915
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
916
|
+
result: {
|
|
917
|
+
[SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
918
|
+
context.statusCode,
|
|
919
|
+
headers,
|
|
920
|
+
build.basename
|
|
921
|
+
)
|
|
922
|
+
},
|
|
923
|
+
headers,
|
|
924
|
+
status: SINGLE_FETCH_REDIRECT_STATUS
|
|
925
|
+
});
|
|
880
926
|
}
|
|
881
927
|
if (context.errors) {
|
|
882
928
|
Object.values(context.errors).forEach((err) => {
|
|
@@ -934,21 +980,6 @@ function generateSingleFetchResponse(request, build, serverMode, {
|
|
|
934
980
|
}
|
|
935
981
|
);
|
|
936
982
|
}
|
|
937
|
-
function generateSingleFetchRedirectResponse(redirectResponse, request, build, serverMode) {
|
|
938
|
-
let redirect2 = getSingleFetchRedirect(
|
|
939
|
-
redirectResponse.status,
|
|
940
|
-
redirectResponse.headers,
|
|
941
|
-
build.basename
|
|
942
|
-
);
|
|
943
|
-
let headers = new Headers(redirectResponse.headers);
|
|
944
|
-
headers.delete("Location");
|
|
945
|
-
headers.set("Content-Type", "text/x-script");
|
|
946
|
-
return generateSingleFetchResponse(request, build, serverMode, {
|
|
947
|
-
result: request.method === "GET" ? { [SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
948
|
-
headers,
|
|
949
|
-
status: SINGLE_FETCH_REDIRECT_STATUS
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
983
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
953
984
|
let redirect2 = headers.get("Location");
|
|
954
985
|
if (basename) {
|
|
@@ -1066,15 +1097,15 @@ var createRequestHandler = (build, mode) => {
|
|
|
1066
1097
|
request
|
|
1067
1098
|
});
|
|
1068
1099
|
};
|
|
1069
|
-
if (_build.future.
|
|
1070
|
-
if (initialContext && !(initialContext instanceof
|
|
1100
|
+
if (_build.future.unstable_middleware) {
|
|
1101
|
+
if (initialContext && !(initialContext instanceof unstable_RouterContextProvider)) {
|
|
1071
1102
|
let error = new Error(
|
|
1072
|
-
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `
|
|
1103
|
+
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `unstable_RouterContextProvider` from your `getLoadContext` function."
|
|
1073
1104
|
);
|
|
1074
1105
|
handleError(error);
|
|
1075
1106
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1076
1107
|
}
|
|
1077
|
-
loadContext = initialContext || new
|
|
1108
|
+
loadContext = initialContext || new unstable_RouterContextProvider();
|
|
1078
1109
|
} else {
|
|
1079
1110
|
loadContext = initialContext || {};
|
|
1080
1111
|
}
|
|
@@ -1174,14 +1205,6 @@ var createRequestHandler = (build, mode) => {
|
|
|
1174
1205
|
loadContext,
|
|
1175
1206
|
handleError
|
|
1176
1207
|
);
|
|
1177
|
-
if (isRedirectResponse(response)) {
|
|
1178
|
-
response = generateSingleFetchRedirectResponse(
|
|
1179
|
-
response,
|
|
1180
|
-
request,
|
|
1181
|
-
_build,
|
|
1182
|
-
serverMode
|
|
1183
|
-
);
|
|
1184
|
-
}
|
|
1185
1208
|
if (_build.entry.module.handleDataRequest) {
|
|
1186
1209
|
response = await _build.entry.module.handleDataRequest(response, {
|
|
1187
1210
|
context: loadContext,
|
|
@@ -1189,11 +1212,29 @@ var createRequestHandler = (build, mode) => {
|
|
|
1189
1212
|
request
|
|
1190
1213
|
});
|
|
1191
1214
|
if (isRedirectResponse(response)) {
|
|
1192
|
-
|
|
1193
|
-
response,
|
|
1194
|
-
|
|
1195
|
-
_build
|
|
1196
|
-
|
|
1215
|
+
let result = getSingleFetchRedirect(
|
|
1216
|
+
response.status,
|
|
1217
|
+
response.headers,
|
|
1218
|
+
_build.basename
|
|
1219
|
+
);
|
|
1220
|
+
if (request.method === "GET") {
|
|
1221
|
+
result = {
|
|
1222
|
+
[SingleFetchRedirectSymbol]: result
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
let headers = new Headers(response.headers);
|
|
1226
|
+
headers.set("Content-Type", "text/x-script");
|
|
1227
|
+
return new Response(
|
|
1228
|
+
encodeViaTurboStream(
|
|
1229
|
+
result,
|
|
1230
|
+
request.signal,
|
|
1231
|
+
_build.entry.module.streamTimeout,
|
|
1232
|
+
serverMode
|
|
1233
|
+
),
|
|
1234
|
+
{
|
|
1235
|
+
status: SINGLE_FETCH_REDIRECT_STATUS,
|
|
1236
|
+
headers
|
|
1237
|
+
}
|
|
1197
1238
|
);
|
|
1198
1239
|
}
|
|
1199
1240
|
}
|
|
@@ -1302,7 +1343,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1302
1343
|
try {
|
|
1303
1344
|
let result = await staticHandler.query(request, {
|
|
1304
1345
|
requestContext: loadContext,
|
|
1305
|
-
|
|
1346
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
1306
1347
|
try {
|
|
1307
1348
|
let innerResult = await query(request);
|
|
1308
1349
|
if (!isResponse(innerResult)) {
|
|
@@ -1438,7 +1479,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1438
1479
|
let result = await staticHandler.queryRoute(request, {
|
|
1439
1480
|
routeId,
|
|
1440
1481
|
requestContext: loadContext,
|
|
1441
|
-
|
|
1482
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (queryRoute) => {
|
|
1442
1483
|
try {
|
|
1443
1484
|
let innerResult = await queryRoute(request);
|
|
1444
1485
|
return handleQueryRouteResult(innerResult);
|
|
@@ -1933,7 +1974,7 @@ function createCallServer({
|
|
|
1933
1974
|
function createRouterFromPayload({
|
|
1934
1975
|
fetchImplementation,
|
|
1935
1976
|
createFromReadableStream,
|
|
1936
|
-
|
|
1977
|
+
unstable_getContext,
|
|
1937
1978
|
payload
|
|
1938
1979
|
}) {
|
|
1939
1980
|
const globalVar = window;
|
|
@@ -1971,7 +2012,7 @@ function createRouterFromPayload({
|
|
|
1971
2012
|
}, []);
|
|
1972
2013
|
globalVar.__reactRouterDataRouter = createRouter({
|
|
1973
2014
|
routes,
|
|
1974
|
-
|
|
2015
|
+
unstable_getContext,
|
|
1975
2016
|
basename: payload.basename,
|
|
1976
2017
|
history: createBrowserHistory(),
|
|
1977
2018
|
hydrationData: getHydrationData(
|
|
@@ -2081,7 +2122,7 @@ function createRouterFromPayload({
|
|
|
2081
2122
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2082
2123
|
};
|
|
2083
2124
|
}
|
|
2084
|
-
var renderedRoutesContext =
|
|
2125
|
+
var renderedRoutesContext = unstable_createContext();
|
|
2085
2126
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2086
2127
|
let dataStrategy = getSingleFetchDataStrategyImpl(
|
|
2087
2128
|
getRouter,
|
|
@@ -2108,7 +2149,7 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2108
2149
|
return M.route.hasComponent && !M.route.element;
|
|
2109
2150
|
}
|
|
2110
2151
|
);
|
|
2111
|
-
return async (args) => args.
|
|
2152
|
+
return async (args) => args.unstable_runClientMiddleware(async () => {
|
|
2112
2153
|
let context = args.context;
|
|
2113
2154
|
context.set(renderedRoutesContext, []);
|
|
2114
2155
|
let results = await dataStrategy(args);
|
|
@@ -2194,17 +2235,22 @@ function RSCHydratedRouter({
|
|
|
2194
2235
|
fetch: fetchImplementation = fetch,
|
|
2195
2236
|
payload,
|
|
2196
2237
|
routeDiscovery = "eager",
|
|
2197
|
-
|
|
2238
|
+
unstable_getContext
|
|
2198
2239
|
}) {
|
|
2199
2240
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2200
2241
|
let { router, routeModules } = React4.useMemo(
|
|
2201
2242
|
() => createRouterFromPayload({
|
|
2202
2243
|
payload,
|
|
2203
2244
|
fetchImplementation,
|
|
2204
|
-
|
|
2245
|
+
unstable_getContext,
|
|
2205
2246
|
createFromReadableStream
|
|
2206
2247
|
}),
|
|
2207
|
-
[
|
|
2248
|
+
[
|
|
2249
|
+
createFromReadableStream,
|
|
2250
|
+
payload,
|
|
2251
|
+
fetchImplementation,
|
|
2252
|
+
unstable_getContext
|
|
2253
|
+
]
|
|
2208
2254
|
);
|
|
2209
2255
|
React4.useEffect(() => {
|
|
2210
2256
|
setIsHydrated();
|
|
@@ -2276,7 +2322,7 @@ function RSCHydratedRouter({
|
|
|
2276
2322
|
future: {
|
|
2277
2323
|
// These flags have no runtime impact so can always be false. If we add
|
|
2278
2324
|
// flags that drive runtime behavior they'll need to be proxied through.
|
|
2279
|
-
|
|
2325
|
+
unstable_middleware: false,
|
|
2280
2326
|
unstable_subResourceIntegrity: false
|
|
2281
2327
|
},
|
|
2282
2328
|
isSpaMode: false,
|
|
@@ -2692,7 +2738,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2692
2738
|
future: {
|
|
2693
2739
|
// These flags have no runtime impact so can always be false. If we add
|
|
2694
2740
|
// flags that drive runtime behavior they'll need to be proxied through.
|
|
2695
|
-
|
|
2741
|
+
unstable_middleware: false,
|
|
2696
2742
|
unstable_subResourceIntegrity: false
|
|
2697
2743
|
},
|
|
2698
2744
|
isSpaMode: false,
|