-
-
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
Improved compatibility with the upcoming @types/react
for React 19
#3206
Conversation
🦋 Changeset detectedLatest commit: 7b6928e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
I'm looking into the CI failures |
|
@emmatown |
Hmmm, that's seems unfortunate. It doesn't seem to hard branch (with |
We can’t trust error types that result from |
@emmatown wdyt? |
Wouldn't something like this work without being susceptible to any issues like that? type JSXElement = 2 extends Parameters<React.FunctionComponent<any>>['length']
? // @ts-ignore
JSX.Element
: // @ts-ignore
React.JSX.Element |
JSX
with React.JSX
@types/react
for React 19
Do u always have to have the answer? 😉 I applied the suggestion. I think this should be good to go now. |
a1ffe73
to
b9b2b18
Compare
…led/types/jsx-namespace.d.ts since it's the only thing that's used
What: Replace global
JSX
withReact.JSX
Why: Prepare for upcoming
@types/react
version which removes globalJSX
How: Upgrade
@types/react
to^18.2.6
which is the version that introducesReact.JSX
and use it to replace globalJSX
Checklist:
Additional comments:
@types/react
as well to match the other packages.Let me know if there's anything I might have missed.