Skip to content

Commit 65097ab

Browse files
committed
Remove v7_skipActionErrorRevalidationFlag
1 parent 90ebbf9 commit 65097ab

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": major
3+
---
4+
5+
Remove `v7_skipActionErrorRevalidation` flag

packages/react-router/__tests__/router/should-revalidate-test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,6 @@ describe("shouldRevalidate", () => {
12021202
root: "ROOT",
12031203
},
12041204
},
1205-
future: { v7_skipActionErrorRevalidation: true },
12061205
});
12071206
router.initialize();
12081207

@@ -1270,7 +1269,6 @@ describe("shouldRevalidate", () => {
12701269
root: "ROOT",
12711270
},
12721271
},
1273-
future: { v7_skipActionErrorRevalidation: true },
12741272
});
12751273
router.initialize();
12761274

packages/react-router/lib/dom/server.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ export function createStaticRouter(
302302
},
303303
get future() {
304304
return {
305-
v7_skipActionErrorRevalidation: false,
306305
...opts?.future,
307306
};
308307
},

packages/react-router/lib/dom/ssr/browser.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ function createHydratedRouter(): RemixRouter {
187187
routes,
188188
history: createBrowserHistory(),
189189
basename: ssrInfo.context.basename,
190-
future: {
191-
// Single fetch enables this underlying behavior
192-
v7_skipActionErrorRevalidation: true,
193-
},
194190
hydrationData,
195191
mapRouteProperties,
196192
unstable_dataStrategy: getSingleFetchDataStrategy(

packages/react-router/lib/router/router.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,7 @@ export type HydrationState = Partial<
353353
/**
354354
* Future flags to toggle new feature behavior
355355
*/
356-
export interface FutureConfig {
357-
v7_skipActionErrorRevalidation: boolean;
358-
}
356+
export interface FutureConfig {}
359357

360358
/**
361359
* Initialization options for createRouter
@@ -812,7 +810,6 @@ export function createRouter(init: RouterInit): Router {
812810

813811
// Config driven behavior flags
814812
let future: FutureConfig = {
815-
v7_skipActionErrorRevalidation: false,
816813
...init.future,
817814
};
818815
// Cleanup function for history
@@ -1897,7 +1894,6 @@ export function createRouter(init: RouterInit): Router {
18971894
activeSubmission,
18981895
location,
18991896
initialHydration === true,
1900-
future.v7_skipActionErrorRevalidation,
19011897
isRevalidationRequired,
19021898
cancelledFetcherLoads,
19031899
fetchersQueuedForDeletion,
@@ -2317,7 +2313,6 @@ export function createRouter(init: RouterInit): Router {
23172313
submission,
23182314
nextLocation,
23192315
false,
2320-
future.v7_skipActionErrorRevalidation,
23212316
isRevalidationRequired,
23222317
cancelledFetcherLoads,
23232318
fetchersQueuedForDeletion,
@@ -4147,7 +4142,6 @@ function getMatchesToLoad(
41474142
submission: Submission | undefined,
41484143
location: Location,
41494144
isInitialLoad: boolean,
4150-
skipActionErrorRevalidation: boolean,
41514145
isRevalidationRequired: boolean,
41524146
cancelledFetcherLoads: string[],
41534147
fetchersQueuedForDeletion: Set<string>,
@@ -4180,8 +4174,7 @@ function getMatchesToLoad(
41804174
let actionStatus = pendingActionResult
41814175
? pendingActionResult[1].statusCode
41824176
: undefined;
4183-
let shouldSkipRevalidation =
4184-
skipActionErrorRevalidation && actionStatus && actionStatus >= 400;
4177+
let shouldSkipRevalidation = actionStatus && actionStatus >= 400;
41854178

41864179
let navigationMatches = boundaryMatches.filter((match, index) => {
41874180
let { route } = match;

0 commit comments

Comments
 (0)