You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an impure connected component is re-rendered due to its parent's state changing, its shouldComponentUpdate returns true, but if a non-default mergeProps is supplied then checkMergedEquals will also be true, causing the component to only update if its nextMergedProps have changed from the previous mergedProps.
In this JSFiddle example, I would expect the root component's setState to trigger a re-render of the PartComponent and both of the impure components, but since the second impure component has a custom mergeProps, it doesn't update.
When an impure connected component is re-rendered due to its parent's state changing, its
shouldComponentUpdate
returns true, but if a non-defaultmergeProps
is supplied thencheckMergedEquals
will also be true, causing the component to only update if itsnextMergedProps
have changed from the previousmergedProps
.In this JSFiddle example, I would expect the root component's
setState
to trigger a re-render of thePartComponent
and both of the impure components, but since the second impure component has a custommergeProps
, it doesn't update.The text was updated successfully, but these errors were encountered: