Skip to content

Cancel any pending requests if component is unmounted #248

@OsamaShabrez

Description

@OsamaShabrez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions