Skip to content

Commit f404f82

Browse files
authored
Replace usage of deprecated JSX global namespace with React.JSX (#2163)
1 parent 5ec7970 commit f404f82

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/components/connect.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ function connect<
651651
/**
652652
* @todo Change this to `React.useRef<Error>(undefined)` after upgrading to React 19.
653653
*/
654-
const latestSubscriptionCallbackError = React.useRef<Error | undefined>(undefined)
654+
const latestSubscriptionCallbackError = React.useRef<Error | undefined>(
655+
undefined,
656+
)
655657

656658
useIsomorphicLayoutEffect(() => {
657659
isMounted.current = true
@@ -756,11 +758,11 @@ function connect<
756758
const renderedWrappedComponent = React.useMemo(() => {
757759
return (
758760
// @ts-ignore
759-
(<WrappedComponent
761+
<WrappedComponent
760762
{...actualChildProps}
761763
ref={reactReduxForwardedRef}
762-
/>)
763-
);
764+
/>
765+
)
764766
}, [reactReduxForwardedRef, WrappedComponent, actualChildProps])
765767

766768
// If React sees the exact same element reference as last time, it bails out of re-rendering

test/components/Provider.spec.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*eslint-disable react/prop-types*/
22

33
import * as rtl from '@testing-library/react'
4-
import type { Dispatch } from 'react'
4+
import type { Dispatch, JSX } from 'react'
55
import React, { Component } from 'react'
66
import type { Store } from 'redux'
77
import { createStore } from 'redux'

test/components/connect.spec.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*eslint-disable react/prop-types*/
22

33
import * as rtl from '@testing-library/react'
4-
import type { Dispatch, ElementType, MouseEvent, ReactNode } from 'react'
4+
import type { Dispatch, ElementType, MouseEvent, ReactNode, JSX } from 'react'
55
import React, { Component } from 'react'
66
import type {
77
Action,

0 commit comments

Comments
 (0)