-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected copies of the props object retained in memory with the new hooks API #14057
Comments
I wonder if this could be the same issue as #13702 (comment). Do you mind looking at what retains the references? |
It is a similar issue, I just thought that |
Here is another CodeSandbox example that clearly shows that deeply nested component trees( |
Has this been fixed? Seem to experience the same issue with react 4.3.0. |
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. |
Would be interested to see if/when this issue resolved without it being resolved. |
Does this still reproduce with React 18? We've made some memory-related changes there. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
props
object that were used when component was rendered for the first time is kept alive. Completely unexpected behavior even when developer understands closure context sharing.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/lz61v39r7
t0
,t-2
,t-1
,t
What is the expected behavior?
Should be 2 arrays retained in memory
t-1
,t
.The text was updated successfully, but these errors were encountered: