Skip to content

Commit fcce9fe

Browse files
committed
Update release notes
1 parent e85e02e commit fcce9fe

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ The following APIs have been removed in React Router v7:
285285

286286
React Router v7 requires the following minimum versions:
287287

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
289290
- `react@18`, `react-dom@18`
290291

291292
#### Adopted Future Flag Behaviors
@@ -693,11 +694,14 @@ async function fakeGetSlugsFromCms() {
693694
- Remove `future.v7_fetcherPersist` flag ([#11731](https://github.com/remix-run/react-router/pull/11731))
694695
- 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))
695696
- 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
696699

697700
### Major Changes (`@react-router/*`)
698701

699702
- 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
701705
- Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675))
702706
- No longer re-export APIs from `react-router` through different runtime/adapter packages ([#11702](https://github.com/remix-run/react-router/pull/11702))
703707
- 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() {
712716
- `createSessionStorageFactory`
713717
- `createCookieSessionStorageFactory`
714718
- `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))
720+
- Examples: `LoaderFunction`, `LoaderFunctionArgs`, `ActionFunction`, `ActionFunctionArgs`, `DataFunctionArgs`, `RouteManifest`, `LinksFunction`, `Route`, `EntryRoute`
721+
- The `RouteManifest` type used by the "remix" code is now slightly stricter because it is using the former `@remix-run/router` `RouteManifest`
722+
- `Record<string, Route> -> Record<string, Route | undefined>`
723+
- 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))
715736
- `@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))
716737
- `@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))
717738
- `@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() {
747768

748769
### Patch Changes
749770

771+
- Replace `substr` with `substring` ([#12080](https://github.com/remix-run/react-router/pull/12080))
750772
- `react-router` - Fix redirects returned from loaders/actions using `data()` ([#12021](https://github.com/remix-run/react-router/pull/12021))
751773

752774
### Changes by Package

0 commit comments

Comments
 (0)