@@ -253,6 +253,7 @@ export default function connectAdvanced(
253253 const lastChildProps = useRef ( )
254254 const lastWrapperProps = useRef ( wrapperProps )
255255 const childPropsFromStoreUpdate = useRef ( )
256+ const renderIsScheduled = useRef ( false )
256257
257258 const actualChildProps = usePureOnlyMemo ( ( ) => {
258259 // Tricky logic here:
@@ -282,6 +283,7 @@ export default function connectAdvanced(
282283 // We want to capture the wrapper props and child props we used for later comparisons
283284 lastWrapperProps . current = wrapperProps
284285 lastChildProps . current = actualChildProps
286+ renderIsScheduled . current = false
285287
286288 // If the render was from a store update, clear out that reference and cascade the subscriber update
287289 if ( childPropsFromStoreUpdate . current ) {
@@ -328,14 +330,17 @@ export default function connectAdvanced(
328330
329331 // If the child props haven't changed, nothing to do here - cascade the subscription update
330332 if ( newChildProps === lastChildProps . current ) {
331- notifyNestedSubs ( )
333+ if ( ! renderIsScheduled . current ) {
334+ notifyNestedSubs ( )
335+ }
332336 } else {
333337 // Save references to the new child props. Note that we track the "child props from store update"
334338 // as a ref instead of a useState/useReducer because we need a way to determine if that value has
335339 // been processed. If this went into useState/useReducer, we couldn't clear out the value without
336340 // forcing another re-render, which we don't want.
337341 lastChildProps . current = newChildProps
338342 childPropsFromStoreUpdate . current = newChildProps
343+ renderIsScheduled . current = true
339344
340345 // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render
341346 forceComponentUpdateDispatch ( {
0 commit comments