Skip to content
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

Menu: "Can't perform a React state update on an unmounted component" #1898

Closed
oddvernes opened this issue Jan 17, 2022 · 0 comments · Fixed by #1900
Closed

Menu: "Can't perform a React state update on an unmounted component" #1898

oddvernes opened this issue Jan 17, 2022 · 0 comments · Fixed by #1900
Assignees
Labels
🐛 bug Something isn't working core-react eds-core-react

Comments

@oddvernes
Copy link
Collaborator

Describe the bug

Warning: 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. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.

setFocusedIndex @ Menu.context.tsx:34

Steps to reproduce the bug

  1. Open playground in storybook
  2. Click on one of the menu buttons rightmost in the table and then click outside to close menu
  3. now there is a warning in console. It only happens once, subsequent open/close menu does not produce warning until page is refreshed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working core-react eds-core-react
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant