react-native-masonry icon indicating copy to clipboard operation
react-native-masonry copied to clipboard

Can't call setState on an unmounted component

Open novalain opened this issue 7 years ago • 0 comments

Hey! It currently seems like some async operation in the component is not being properly canceled when unmounted.

Expected Behavior

No warnings.

Current Behavior

Warning: 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.

Possible Solution

Cancel all subscriptions/async operations in the internal componentWillUnmount

Steps to Reproduce

o Include the minimal <Masonry> component from the samples o Watch the warning appear on Android and iOS

Thanks!

novalain avatar Aug 06 '18 20:08 novalain