Skip to content

Commit 26504c3

Browse files
committed
v2: remove unstable_shouldReload references
1 parent accd20c commit 26504c3

File tree

5 files changed

+5
-185
lines changed

5 files changed

+5
-185
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/react": major
3+
---
4+
5+
Remove `unstable_shouldReload`, which has been replaced by `shouldRevalidate`

docs/api/conventions.md

-7
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ title: Conventions
190190

191191
[Moved →][moved-44]
192192

193-
### unstable_shouldReload
194-
195-
[Moved →][moved-45]
196-
197193
#### Never reloading the root
198194

199195
[Moved →][moved-46]
@@ -250,7 +246,4 @@ title: Conventions
250246
[moved-42]: ../route/catch-boundary
251247
[moved-43]: ../route/error-boundary
252248
[moved-44]: ../route/handle
253-
[moved-45]: ../route/should-reload
254-
[moved-46]: ../route/should-reload#never-reloading-the-root
255-
[moved-47]: ../route/should-reload#ignoring-search-params
256249
[moved-48]: ../other-api/asset-imports

docs/route/should-reload.md

-154
This file was deleted.

packages/remix-react/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export type {
7777
V2_MetaDescriptor,
7878
V2_MetaFunction,
7979
RouteModules as UNSAFE_RouteModules,
80-
ShouldReloadFunction,
8180
} from "./routeModules";
8281

8382
export { ScrollRestoration } from "./scroll-restoration";

packages/remix-react/routeModules.ts

-23
Original file line numberDiff line numberDiff line change
@@ -205,26 +205,3 @@ export async function loadRouteModule(
205205
});
206206
}
207207
}
208-
209-
/**
210-
* @deprecated The `unstable_shouldReload` function has been removed, so this
211-
* function will never run and route data will be revalidated on every request.
212-
* Please update the function name to `shouldRevalidate` and use the
213-
* `ShouldRevalidateFunction` interface.
214-
*/
215-
export interface ShouldReloadFunction {
216-
(args: {
217-
url: URL;
218-
prevUrl: URL;
219-
params: Params;
220-
submission?: Submission;
221-
}): boolean;
222-
}
223-
224-
interface Submission {
225-
action: string;
226-
method: string;
227-
formData: FormData;
228-
encType: string;
229-
key: string;
230-
}

0 commit comments

Comments
 (0)