-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
With React 19 typings: Cannot find namespace 'JSX'. #4011
Labels
Comments
Philipp91
added a commit
to Philipp91/formik
that referenced
this issue
Dec 7, 2024
To match the react v17 that's already being used. This makes the new React.JSX type available, which is needed for v19 compatibility, see jaredpalmer#4011.
Philipp91
added a commit
to Philipp91/formik
that referenced
this issue
Dec 7, 2024
Fixes jaredpalmer#4011. This is for compatibility with React v19, where the global JSX namespace went away.
Philipp91
added a commit
to Philipp91/formik
that referenced
this issue
Dec 7, 2024
Fixes jaredpalmer#4011. This is for compatibility with React v19, where the global JSX namespace went away.
Then |
Lovely, thanks man, Anyway I have another solution to overrides it with react
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Current Behavior
I use the latest formik release with React v19, specifically
"@types/react": "^19.0.1"
and I get 4 errors like:Expected behavior
No type errors.
Suggested solution(s)
s/JSX/React.JSX
Additional context
https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript
It's only about typings anyway. In
@react/types
, this was backported also to the v16 series, so the proposed change doesn't require React v19 to work.Your environment
The text was updated successfully, but these errors were encountered: