Make sure component is mounted before calling setState.
See original GitHub issueHere the setState is called in callback (measure, requestAnimationFrame). In react code can happen that tooltip is removed before this code is executed (virtual lists) and throws an error.
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 the componentWillUnmount method.
in Tooltip (at withTheme.js:42)
in ThemedComponent (at withTheme.js:59)
in ForwardRef(Themed.Tooltip) (at base.item.component.tsx:249)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
React: Stop checking if your component is mounted - Medium
This article will provide solutions to the “Can't perform a React state update on an unmounted component” warning and why a call to...
Read more >Is there a way to check if the react component is unmounted?
The one you need depends on why you are calling setState when the component is unmounted. if you are using a Flux store...
Read more >React - How to Check if a Component is Mounted or Unmounted
This is a quick post to show how to track the mounted status of a React component so you can check if it's...
Read more >isMounted is an Antipattern – React Blog
Specifically, calling setState() in an unmounted component means that your app is still holding a reference to the component after the component ......
Read more >Prevent React setState on unmounted Component
How to avoid the React warning: Can only update a mounted or mounting component. It usually means you have called setState on an...
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
This also isn’t an error. Just a warning.
@flyingcircle i am getting this error while committing the changes and because of this I am not able to push my code. It is showing there is some error in
withTheme.tsx
but I didn’t make any changes in that file. Can you please tell me what is going wrong so that I can push my changes.