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

Cancel any pending requests if component is unmounted #248

Open
OsamaShabrez opened this Issue Aug 12, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@OsamaShabrez

OsamaShabrez commented Aug 12, 2018

Can't call setState (or forceUpdate) 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

If you quickly switch between different components and Map is still loading, react complains of memory leak.

We need something similar to axios pending request cancelation in this library to cancel all pending requests and gracefully let the component unmount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment