Skip to content

Commit 58af1d7

Browse files
authored
chore(react): Remove private namespace JSX (#12691)
1 parent a6e2f77 commit 58af1d7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/react/src/reactrouter.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
import type { Client, Integration, Span, TransactionSource } from '@sentry/types';
1717
import hoistNonReactStatics from 'hoist-non-react-statics';
1818
import * as React from 'react';
19+
import type { ReactElement } from 'react';
1920

2021
import type { Action, Location } from './types';
2122

@@ -32,7 +33,7 @@ export type RouteConfig = {
3233
[propName: string]: unknown;
3334
path?: string | string[];
3435
exact?: boolean;
35-
component?: JSX.Element;
36+
component?: ReactElement;
3637
routes?: RouteConfig[];
3738
};
3839

packages/react/src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Disabling `no-explicit-any` for the whole file as `any` has became common requirement.
22
/* eslint-disable @typescript-eslint/no-explicit-any */
3+
import type { ReactElement } from 'react';
34

45
export type Action = 'PUSH' | 'REPLACE' | 'POP';
56

@@ -67,7 +68,7 @@ export type UseNavigationType = () => Action;
6768
// react-router > 6.0.0 and >= 6.4.2.
6869
export type RouteObjectArrayAlias = any;
6970
export type RouteMatchAlias = any;
70-
export type CreateRoutesFromChildren = (children: JSX.Element[]) => RouteObjectArrayAlias;
71+
export type CreateRoutesFromChildren = (children: ReactElement[]) => RouteObjectArrayAlias;
7172
export type MatchRoutes = (
7273
routes: RouteObjectArrayAlias,
7374
location: Location,

0 commit comments

Comments
 (0)