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. 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. #241

Open
quyen-uit opened this issue Dec 5, 2020 · 2 comments

Comments

@quyen-uit
Copy link

quyen-uit commented Dec 5, 2020

If i close modal by swipe-out, it work perfectly. But if i close modal by back of device or touch outside, it work with some errors like image:

image

My code:

<BottomModal
        visible={modalVisible}
        onSwipeOut={event => {
          setModalVisible(false);
        }}
        onHardwareBackPress={() => {
          setModalVisible(false);
          return true;
        }}
        onTouchOutside={() => {
          setModalVisible(false);
        }}
        swipeDirection={['down']} // can be string or an array
        swipeThreshold={100} // default 100
        useNativeDriver={true}
        modalAnimation={
          new SlideAnimation({
            initialValue: 0, // optional
            slideFrom: 'bottom', // optional
            useNativeDriver: true, // optional
          })
        }
      >
        <ModalContent style={styles.content}>
         //content
        </ModalContent>
      </BottomModal>

How to fix this? Tks all.

@vincenzopalazzo
Copy link

+1

@quyen-uit
Copy link
Author

any news ??

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

2 participants