Skip to content

Timeout triggered after component was unmounted #10

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

Open
anttimann opened this issue Oct 7, 2016 · 0 comments
Open

Timeout triggered after component was unmounted #10

anttimann opened this issue Oct 7, 2016 · 0 comments

Comments

@anttimann
Copy link
Contributor

I'm using slider in a modal that will be removed when onSlideSuccess is executed. Problem is that timeout with setState is triggered 1 second after that. In my case component doesn't exist anymore and React complain about it:

Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the SlideButton component.

That timeout could be cleared with clearTimeout or fixed in some other way when React component is unmounted.

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

1 participant