diff --git a/src/components/connect.tsx b/src/components/connect.tsx index 23d4c1828..a2fc62245 100644 --- a/src/components/connect.tsx +++ b/src/components/connect.tsx @@ -651,7 +651,9 @@ function connect< /** * @todo Change this to `React.useRef(undefined)` after upgrading to React 19. */ - const latestSubscriptionCallbackError = React.useRef(undefined) + const latestSubscriptionCallbackError = React.useRef( + undefined, + ) useIsomorphicLayoutEffect(() => { isMounted.current = true @@ -756,11 +758,11 @@ function connect< const renderedWrappedComponent = React.useMemo(() => { return ( // @ts-ignore - () - ); + /> + ) }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]) // If React sees the exact same element reference as last time, it bails out of re-rendering diff --git a/test/components/Provider.spec.tsx b/test/components/Provider.spec.tsx index 05b7704e9..b6caf0f37 100644 --- a/test/components/Provider.spec.tsx +++ b/test/components/Provider.spec.tsx @@ -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' diff --git a/test/components/connect.spec.tsx b/test/components/connect.spec.tsx index 1a81606d5..81ff00094 100644 --- a/test/components/connect.spec.tsx +++ b/test/components/connect.spec.tsx @@ -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,