DropdownV2 downshift memory leak
See original GitHub issueDetailed description
This applies to any component using downshift.
If the component (specifically DropdownV2 in my case) is focused, when the component is unmounted and dismissed after the submit, in a modal for example, react warns Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application.
Steps to reproduce the issue
- Display a modal with DropdownV2
- Select an option in the dropdown
- While the dropdown is still in focus, click the primary button submit in the modal
- This will close the modal and display the memory error (only if the component is in focus when submitting)
Additional information
This seems to have been a known error and solved in version 2.0.7 of downshift. Currently carbon-components-react seems to have ^1.31.14 as the downshift dependency version. https://github.com/downshift-js/downshift/issues/476
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Build a dropdown in React using Downshift + TS
It can become complicated to build them out yourself. This is one of those scenarios where you have 2 options, build it from...
Read more >Memoizing downshift useCombobox callbacks with useCallback
Working on this: https://github.com/ downshift -js/ downshift /issues/1050.
Read more >Symptoms of a Bad or Failing Downshift Solenoid
A bad or failing solenoid may cause the vehicle to experience hard or erratic shifting when slowing down or coming to a stop....
Read more >Huge severe memory leak in Safari 14 - Apple Community
Huge severe memory leak in Safari 14 ... I have to restart Safari latest every second day because of leaking memory. ... Reply...
Read more >How to remove options from select element without memory ...
Options does not removing from memory. After that, I try my code in Chrome ver. 23, and I can see memory leak too....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dakahn we will need to bump to v3 of downshift, I believe, if we want to keep using it 👍 I believe they have migration guides to help us out here too
Hi there! 👋 If you’re wondering why this issue was moved, we’re currently updating our repo structure so that every package is found in the same project.
This should not have any impact for you, but we wanted to give you a heads up in case you were wondering what is going on. If you have any questions, feel free to reach out to us on Slack or contact us at: carbon@us.ibm.com. Thanks!