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

Warning: Can't perform a React state update on an unmounted component. #172

Closed
daniteohotmail opened this issue Apr 7, 2021 · 9 comments

Comments

@daniteohotmail
Copy link

daniteohotmail commented Apr 7, 2021

When I fast change the page on my website, sometimes I get this error on browser console:

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. Carousel@http://localhost:3000/static/js/vendors~main.chunk.js:56014:20
div
Container@http://localhost:3000/static/js/vendors~main.chunk.js:79174:18
.....

The part of code reported by console is this:

function Carousel(props) {
    var _this;

    _classCallCheck(this, Carousel);

I know it's not a big deal but it's a bit annoying.
Or I wrong something in the implementation?

Thank you for your job.

@sag1v
Copy link
Owner

sag1v commented Apr 8, 2021

Thanks @daniteohotmail .
Are you using enableAutoPlay prop?

I couldn't reproduce it but i think i know why it's happening. I released a beta version with a fix, can you please try installing version 0.11.5-beta.1 and let me know if the problem is fixed?

@daniteohotmail
Copy link
Author

Hi, enableAutoPlay is false.
I install the 0.11.5-beta.1 version but the problem is still happening.
Can I do any other tests to help you?

@sag1v
Copy link
Owner

sag1v commented Apr 9, 2021

Hmm interesting. Well, a reproducible example can help a lot.

@danielefontana95
Copy link

Hi (I'm the same person with my new account).
I create this sandbox for reproduce it.
https://codesandbox.io/s/crimson-pine-ycu2u
Click two times the button and in console will appear the error.

@sag1v
Copy link
Owner

sag1v commented Apr 13, 2021

@danielefontana95 Thanks! please try this version and let me know 0.11.5-beta.2

@danielefontana95
Copy link

@sag1v Hi! I tested with the 0.11.5-beta.2 version but the error still happening...

@sag1v
Copy link
Owner

sag1v commented Apr 14, 2021

@danielefontana95 Sorry, i published a wrong beta version. Can you try 0.11.5-beta.3 please?

I tested it with your sandbox example and it seems fine.

@danielefontana95
Copy link

Yesssss! It seems to be working correctly now.
Thank you, very great job!

@sag1v
Copy link
Owner

sag1v commented Apr 14, 2021

@danielefontana95 Great. I published it with official release under version 0.11.5

@sag1v sag1v closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants