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
{{ message }}
Repository navigation
Simple memo components being updated with new set of props during context change #14878
Simple memo components receive new props during context change if their parent got rerendered.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
Conceptually from the user's perspective React.memo(Component) & React.memo(Component, shallowEqual) should behave exactly the same (but they dont)
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Current React's master ( 0e67969 ) & current latest release 16.8.2
I've already written a failing test for this - #14876 . Would love to work on fixing this but as mentioned in this PR, I would require some guidance on how this should get fixed properly.
changed the title [-][bug] Simple memo components being updated with new set of props during context change[/-][+]Simple memo components being updated with new set of props during context change[/+]on Feb 18, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.
Activity
[-][bug] Simple memo components being updated with new set of props during context change[/-][+]Simple memo components being updated with new set of props during context change[/+]stale commentedon Jan 10, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.
Andarist commentedon Jan 11, 2020
I still believe the issue is sound, and unless closed by React team member it shouldn't be treated as stale.
gaearon commentedon Apr 28, 2022
Fixed by #24421