@@ -103,7 +103,6 @@ function subscribeUpdates(
103
103
lastWrapperProps : React . MutableRefObject < unknown > ,
104
104
lastChildProps : React . MutableRefObject < unknown > ,
105
105
renderIsScheduled : React . MutableRefObject < boolean > ,
106
- isMounted : React . MutableRefObject < boolean > ,
107
106
childPropsFromStoreUpdate : React . MutableRefObject < unknown > ,
108
107
notifyNestedSubs : ( ) => void ,
109
108
// forceComponentUpdateDispatch: React.Dispatch<any>,
@@ -118,7 +117,7 @@ function subscribeUpdates(
118
117
119
118
// We'll run this callback every time a store subscription update propagates to this component
120
119
const checkForUpdates = ( ) => {
121
- if ( didUnsubscribe || ! isMounted . current ) {
120
+ if ( didUnsubscribe ) {
122
121
// Don't run stale listeners.
123
122
// Redux doesn't guarantee unsubscriptions happen until next dispatch.
124
123
return
@@ -622,18 +621,9 @@ function connect<
622
621
const lastWrapperProps = useRef ( wrapperProps )
623
622
const childPropsFromStoreUpdate = useRef < unknown > ( )
624
623
const renderIsScheduled = useRef ( false )
625
- const isProcessingDispatch = useRef ( false )
626
- const isMounted = useRef ( false )
627
624
628
625
const latestSubscriptionCallbackError = useRef < Error > ( )
629
626
630
- useIsomorphicLayoutEffect ( ( ) => {
631
- isMounted . current = true
632
- return ( ) => {
633
- isMounted . current = false
634
- }
635
- } , [ ] )
636
-
637
627
const actualChildPropsSelector = useMemo ( ( ) => {
638
628
const selector = ( ) => {
639
629
// Tricky logic here:
@@ -677,7 +667,6 @@ function connect<
677
667
lastWrapperProps ,
678
668
lastChildProps ,
679
669
renderIsScheduled ,
680
- isMounted ,
681
670
childPropsFromStoreUpdate ,
682
671
notifyNestedSubs ,
683
672
reactListener
0 commit comments