Skip to content
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

Replace usage of deprecated JSX global namespace with React.JSX #2163

Merged
merged 4 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading