Upgrade to React 18
Updating packages
To use React 18's newest features, you need at least version 3.0.0 of Remotion.
diff
diff
You need to upgrade both react and react-dom:
diff
diff
If you use TypeScript, update to the newest types as well:
diff
diff
Run npm i, or yarn, or pnpm i afterwards, matching your package manager.
Fixing React.FC types
The types for React.FC have changed to no longer include children. If you get a type error, change
tsx
tsx
to:
tsx
tsx
No action required for createRoot()
If React 18 is installed, Remotion will automatically use createRoot() from react-dom/client instead of render from react-dom. You don't need to do anything.