Can't perform a React state update on an unmounted component
See original GitHub issueI am using react-facebook to embed in my website. But I get an error below. Tell me how I can fix it
This’s warning message: 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.
I’m using React v16.4.0
const FanpageFacebook = () => (
<>
<BoxTitle title="Fanpage" showViewMoreButtom={false} />
<div className="bg-white flex p-2.5 mb-2px">
<FacebookProvider
appId="469469066915707
"
>
<Page
href="https://www.facebook.com/khotailieumienphi.tk"
tabs="timeline"
/>
</FacebookProvider>
</div>
</>
);
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Can't perform a React state update on an unmounted ...
Problem. I am writing an application in React and was unable to avoid a super common pitfall, which is calling setState(...) after ...
Read more >React: Prevent state updates on unmounted components
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...
Read more >Fix “Cannot perform a React state update on an unmounted ...
It happens if one performs a state update (call setState) on a component that has been unmounted. React warns us that this causes...
Read more >React state update on an unmounted component - debuggr.io
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...
Read more >React prevent state updates on unmounted components
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...
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 Free
Top 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
I’m still getting this warning after updating to version 8.1.4. It appears #125 is supposed to fix this, but I still get the warning. Any suggestions? It only happens when I navigate to the route directly, rather than being routed to it from the homepage.
Here’s my button:
Here it is used on my login page:
Here’s a screenshot of the console warning:![image](https://user-images.githubusercontent.com/8210038/71327820-60482500-24db-11ea-8836-cf23c6b06fb8.png)
Probably fixed in version 9. Closing it