Skip to content

Commit a5a78fb

Browse files
brophdawg11MichaelDeBoey
authored andcommitted
feat!: remove unstable_shouldReload references (#5685)
1 parent 1bdc06a commit a5a78fb

File tree

5 files changed

+9
-192
lines changed

5 files changed

+9
-192
lines changed

.changeset/remove-should-reload.md

+5
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

+4-14
Original file line numberDiff line numberDiff line change
@@ -190,21 +190,13 @@ title: Conventions
190190

191191
[Moved →][moved-44]
192192

193-
### unstable_shouldReload
193+
### shouldRevalidate
194194

195195
[Moved →][moved-45]
196196

197-
#### Never reloading the root
198-
199-
[Moved →][moved-46]
200-
201-
#### Ignoring search params
202-
203-
[Moved →][moved-47]
204-
205197
## Asset URL Imports
206198

207-
[Moved →][moved-48]
199+
[Moved →][moved-46]
208200

209201
[moved]: ../file-conventions/remix-config
210202
[moved-2]: ../file-conventions/remix-config#appdirectory
@@ -250,7 +242,5 @@ title: Conventions
250242
[moved-42]: ../route/catch-boundary
251243
[moved-43]: ../route/error-boundary
252244
[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
256-
[moved-48]: ../other-api/asset-imports
245+
[moved-45]: ../route/should-revalidate
246+
[moved-46]: ../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)