You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -285,7 +285,8 @@ The following APIs have been removed in React Router v7:
285
285
286
286
React Router v7 requires the following minimum versions:
287
287
288
-
-`node@18`
288
+
-`node@20`
289
+
- React Router no longer provides an `installGlobals` method to [polyfill](https://reactrouter.com/dev/guides/deploying/custom-node#polyfilling-fetch) the `fetch` API
289
290
-`react@18`, `react-dom@18`
290
291
291
292
#### Adopted Future Flag Behaviors
@@ -693,11 +694,14 @@ async function fakeGetSlugsFromCms() {
693
694
- Remove `future.v7_fetcherPersist` flag ([#11731](https://github.com/remix-run/react-router/pull/11731))
694
695
- Allow returning `undefined` from loaders and actions ([#11680](https://github.com/remix-run/react-router/pull/11680), [#12057]([https://github.com/remix-run/react-router/pull/1205))
695
696
- Use `createRemixRouter`/`RouterProvider` in `entry.client` instead of `RemixBrowser` ([#11469](https://github.com/remix-run/react-router/pull/11469))
697
+
- Remove the deprecated `json` utility ([#12146](https://github.com/remix-run/react-router/pull/12146))
698
+
- You can use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) if you still need to construct JSON responses in your app
696
699
697
700
### Major Changes (`@react-router/*`)
698
701
699
702
- Remove `future.v3_singleFetch` flag ([#11522](https://github.com/remix-run/react-router/pull/11522))
700
-
- Update minimum `node` version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
703
+
- Drop support for Node 16 and 18, update minimum Node version to 20 ([#11690](https://github.com/remix-run/react-router/pull/11690), [#12171](https://github.com/remix-run/react-router/pull/12171))
704
+
- Remove `installGlobals()` as this should no longer be necessary
701
705
- Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675))
702
706
- No longer re-export APIs from `react-router` through different runtime/adapter packages ([#11702](https://github.com/remix-run/react-router/pull/11702))
703
707
- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs
@@ -712,6 +716,23 @@ async function fakeGetSlugsFromCms() {
712
716
-`createSessionStorageFactory`
713
717
-`createCookieSessionStorageFactory`
714
718
-`createMemorySessionStorageFactory`
719
+
- Consolidate types previously duplicated across `@remix-run/router`, `@remix-run/server-runtime`, and `@remix-run/react` now that they all live in `react-router` ([#12177](https://github.com/remix-run/react-router/pull/12177))
- Removed `AppData` type in favor of inlining `unknown` in the few locations it was used
724
+
- Removed `ServerRuntimeMeta*` types in favor of the `Meta*` types they were duplicated from
725
+
- Migrate Remix v2 type generics to React Router ([#12180](https://github.com/remix-run/react-router/pull/12180))
726
+
- These generics are provided for Remix v2 migration purposes
727
+
- These generics and the APIs they exist on should be considered informally deprecated in favor of the new `Route.*` types
728
+
- Anyone migrating from React Router v6 should probably not leverage these new generics and should migrate straight to the `Route.*` types
729
+
- For React Router v6 users, these generics are new and should not impact your app, with one exception
730
+
-`useFetcher` previously had an optional generic (used primarily by Remix v2) that expected the data type
731
+
- This has been updated in v7 to expect the type of the function that generates the data (i.e., `typeof loader`/`typeof action`)
732
+
- Therefore, you should update your usages:
733
+
- ❌ `useFetcher<LoaderData>()`
734
+
- ✅ `useFetcher<typeof loader>()`
735
+
- Update `cookie` dependency to `^1.0.1` - please see the [release notes](https://github.com/jshttp/cookie/releases) for any breaking changes ([#12172](https://github.com/remix-run/react-router/pull/12172))
715
736
-`@react-router/cloudflare` - For Remix consumers migrating to React Router, all exports from `@remix-run/cloudflare-pages` are now provided for React Router consumers in the `@react-router/cloudflare` package. There is no longer a separate package for Cloudflare Pages. ([#11801](https://github.com/remix-run/react-router/pull/11801))
716
737
-`@react-router/cloudflare` - The `@remix-run/cloudflare-workers` package has been deprecated. Remix consumers migrating to React Router should use the `@react-router/cloudflare` package directly. For guidance on how to use `@react-router/cloudflare` within a Cloudflare Workers context, refer to the Cloudflare Workers template. ([#11801](https://github.com/remix-run/react-router/pull/11801))
717
738
-`@react-router/dev` - For Remix consumers migrating to React Router, the `vitePlugin` and `cloudflareDevProxyVitePlugin` exports have been renamed and moved. ([#11904](https://github.com/remix-run/react-router/pull/11904))
@@ -747,6 +768,7 @@ async function fakeGetSlugsFromCms() {
747
768
748
769
### Patch Changes
749
770
771
+
- Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080))
750
772
-`react-router` - Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021))
0 commit comments