Skip to content

Remove private namespace JSX #12691

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

Merged
merged 3 commits into from
Jul 2, 2024
Merged

Remove private namespace JSX #12691

merged 3 commits into from
Jul 2, 2024

Conversation

quisido
Copy link
Contributor

@quisido quisido commented Jun 28, 2024

Using React 19 release candidate, I find that the JSX namespace is now private and cannot be used by dependencies. Doing so produces build errors:

.../Yarn/Berry/cache/@sentry-react-npm-8.13.0-bd23d3c2da-10c0.zip/node_modules/@sentry/react/build/types/reactrouter.d.ts:19:17 - error TS2503: Cannot find namespace 'JSX'.

19     component?: JSX.Element;
                   ~~~

.../Yarn/Berry/cache/@sentry-react-npm-8.13.0-bd23d3c2da-10c0.zip/node_modules/@sentry/react/build/types/types.d.ts:51:51 - error TS2503: Cannot find namespace 'JSX'.

51 export type CreateRoutesFromChildren = (children: JSX.Element[]) => RouteObjectArrayAlias;
                                                     ~~~

Found 2 errors in 2 files.

This PR addresses this issue by replacing JSX.Element with the public type ReactElement.

quisido added 3 commits June 28, 2024 00:32

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
remove private namespace `JSX`
@andreiborza andreiborza self-requested a review July 2, 2024 12:32
@andreiborza andreiborza self-assigned this Jul 2, 2024
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants