question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DropdownV2 downshift memory leak

See original GitHub issue

Detailed 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

  1. Display a modal with DropdownV2
  2. Select an option in the dropdown
  3. While the dropdown is still in focus, click the primary button submit in the modal
  4. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joshblackcommented, May 7, 2019

@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

0reactions
carbon-botcommented, May 9, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found