Bug
After upgrading to 4.4.6 from 4.3.2, we have occasionally noticed this warning related to BottomSheetBackdrop when closing the bottom sheet:
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 a useEffect cleanup function.
in BottomSheetBackdrop
BottomSheetBackdrop usage:
backdropComponent={backdropProps => (
<BottomSheetBackdrop {...backdropProps} disappearsOnIndex={-1} appearsOnIndex={0} pressBehavior="close" />
)}
Environment info
| Library |
Version |
| @gorhom/bottom-sheet |
4.4.6 |
| react-native |
0.67.5 |
| react-native-reanimated |
2.2.4 |
| react-native-gesture-handler |
2.4.2 |
Steps To Reproduce
It happens occasionally both on Android and iOS.
I think it only happens with the modal component.
The warning appears when the sheet is closed (tap on backdrop, drag gesture or programmatically)
Reproducible sample code
Bug
After upgrading to 4.4.6 from 4.3.2, we have occasionally noticed this warning related to
BottomSheetBackdropwhen closing the bottom sheet:BottomSheetBackdrop usage:
Environment info
Steps To Reproduce
It happens occasionally both on Android and iOS.
I think it only happens with the modal component.
The warning appears when the sheet is closed (tap on backdrop, drag gesture or programmatically)
Reproducible sample code