-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 19 Types Support #3186
Comments
WorkaroundUse pnpm patch --edit-dir ./node_modules/.pnpm-patch-emotion-react @emotion/react
cd ./node_modules/.pnpm-patch-emotion-react
npx types-react-codemod@latest preset-19 .
cd ../..
pnpm patch-commit ./node_modules/.pnpm-patch-emotion-react
rm -r ./node_modules/.pnpm-patch-emotion-react
pnpm patch --edit-dir ./node_modules/.pnpm-patch-emotion-styled @emotion/styled
cd ./node_modules/.pnpm-patch-emotion-styled
npx types-react-codemod@latest preset-19 .
cd ../..
pnpm patch-commit ./node_modules/.pnpm-patch-emotion-styled
rm -r ./node_modules/.pnpm-patch-emotion-styled |
We'll get to work on this once React 19 gets published. |
It got released in April. |
It didn't. It's an RC version, not a stable one.
I hope your team sponsors that work instead of relying on free labor in a demanding way. |
Actually, we don't use the @emotion packages directly. |
@andreibicu then do it yourself. |
The problem
Using React 19 with the version of TypeScript types mentioned in the upgrade guide (using pnpm overrides to avoid mismatching types) causes failures with the Emotion types:
@jsxImportSource of @emotion/react
@emotion/styled
Relevant parts of my
package.json
:Proposed solution
@emotion/react
and@emotion/styled
should be updated to support React 19Alternative solutions
No viable alternatives I can think of, apart from not supporting React 19+
Additional context
--
The text was updated successfully, but these errors were encountered: