File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,13 @@ export default function connectAdvanced(
330
330
if ( newChildProps === lastChildProps . current ) {
331
331
notifyNestedSubs ( )
332
332
} else {
333
+ // Save references to the new child props. Note that we track the "child props from store update"
334
+ // as a ref instead of a useState/useReducer because we need a way to determine if that value has
335
+ // been processed. If this went into useState/useReducer, we couldn't clear out the value without
336
+ // forcing another re-render, which we don't want.
337
+ lastChildProps . current = newChildProps
338
+ childPropsFromStoreUpdate . current = newChildProps
339
+
333
340
// If the child props _did_ change (or we caught an error), this wrapper component needs to re-render
334
341
forceComponentUpdateDispatch ( {
335
342
type : 'STORE_UPDATED' ,
@@ -338,13 +345,6 @@ export default function connectAdvanced(
338
345
error
339
346
}
340
347
} )
341
-
342
- // Save references to the new child props. Note that we track the "child props from store update"
343
- // as a ref instead of a useState/useReducer because we need a way to determine if that value has
344
- // been processed. If this went into useState/useReducer, we couldn't clear out the value without
345
- // forcing another re-render, which we don't want.
346
- lastChildProps . current = newChildProps
347
- childPropsFromStoreUpdate . current = newChildProps
348
348
}
349
349
}
350
350
You can’t perform that action at this time.
0 commit comments