Skip to content

Commit

Permalink
Replace usage of deprecated JSX global namespace with React.JSX (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 authored May 1, 2024
1 parent 5ec7970 commit f404f82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/components/connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,9 @@ function connect<
/**
* @todo Change this to `React.useRef<Error>(undefined)` after upgrading to React 19.
*/
const latestSubscriptionCallbackError = React.useRef<Error | undefined>(undefined)
const latestSubscriptionCallbackError = React.useRef<Error | undefined>(
undefined,
)

useIsomorphicLayoutEffect(() => {
isMounted.current = true
Expand Down Expand Up @@ -756,11 +758,11 @@ function connect<
const renderedWrappedComponent = React.useMemo(() => {
return (
// @ts-ignore
(<WrappedComponent
<WrappedComponent
{...actualChildProps}
ref={reactReduxForwardedRef}
/>)
);
/>
)
}, [reactReduxForwardedRef, WrappedComponent, actualChildProps])

// If React sees the exact same element reference as last time, it bails out of re-rendering
Expand Down
2 changes: 1 addition & 1 deletion test/components/Provider.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*eslint-disable react/prop-types*/

import * as rtl from '@testing-library/react'
import type { Dispatch } from 'react'
import type { Dispatch, JSX } from 'react'
import React, { Component } from 'react'
import type { Store } from 'redux'
import { createStore } from 'redux'
Expand Down
2 changes: 1 addition & 1 deletion test/components/connect.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*eslint-disable react/prop-types*/

import * as rtl from '@testing-library/react'
import type { Dispatch, ElementType, MouseEvent, ReactNode } from 'react'
import type { Dispatch, ElementType, MouseEvent, ReactNode, JSX } from 'react'
import React, { Component } from 'react'
import type {
Action,
Expand Down

0 comments on commit f404f82

Please sign in to comment.