Skip to main content

React 19

正在更新软件包

🌐 Updating packages

要使用 React 19 的最新功能,你至少需要 4.0.0 版本的 Remotion。

🌐 To use React 19's newest features, you need at least version 4.0.0 of Remotion.

你需要升级 reactreact-dom

🌐 You need to upgrade both react and react-dom:

- "react": "18.3.1"
- "react-dom": "18.3.1"
+ "react": "19.0.0"
+ "react-dom": "19.0.0"

如果你使用 TypeScript,请同时更新到最新的类型:

🌐 If you use TypeScript, update to the newest types as well:

- "@types/react": "18.3.1"
- "@types/react-dom": "18.3.1"
+ "@types/react": "19.0.0"
+ "@types/react-dom": "19.0.0"

之后运行 npm ibun iyarnpnpm i,与你的包管理器匹配。

🌐 Run npm i, bun i, yarn or pnpm i afterwards, matching your package manager.

已更新的模板

🌐 Updated templates

我们已将所有 模板 更新为使用 React 19(例外:React Native Skia)。 请查看模板的源代码以获取如何升级到 React 19 的示例。

🌐 We have updated all templates to use React 19 (exception: React Native Skia).
See the source code of the templates for examples on how to upgrade it to React 19.

HTMLRefElement 类型更改

🌐 HTMLRefElement Type Change

如果你遇到与 React Refs 相关的类型错误,请升级到 Remotion v4.0.236,我们在该版本中将类型与 React 19 对齐。

🌐 If you have type errors related to React Refs, upgrade to v4.0.236 of Remotion, where we aligned the types with React 19.

生态系统支持

🌐 Ecosystem support

一些与 Remotion 一起使用的库需要升级。

🌐 Some libraries that are used with Remotion need upgrading.

React 三维光纤

🌐 React Three Fiber

9.1.2three 更新为 0.171.0

🌐 Update to 9.1.2 and three to 0.171.0.

styled-components

更新到 v6。

🌐 Update to v6.

Next.js

更新到 Next.js 15。

🌐 Update to Next.js 15.

React Native Skia

尚不支持 React 19,请继续使用 React 18。

🌐 No React 19 support yet. Stay on React 18.