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
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.
The text was updated successfully, but these errors were encountered:
gaearon
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
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.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
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:
https://codesandbox.io/s/jp21pwzrv9
What is the expected behavior?
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.
The text was updated successfully, but these errors were encountered: