Skip to content

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.

@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.

2 participants