react-native-reanimated-bottom-sheet
react-native-reanimated-bottom-sheet copied to clipboard
Gesture is not working
BottomSheet only opens(or closes) when Button is pressed, not when I touch the screen.
Platform: Anroid (phone and emulator) "reanimated-bottom-sheet": "^1.0.0-alpha.22" "react-native-gesture-handler": "^1.7.0" "react-native-reanimated": "^1.13.0",
code:
<Button
title="Open Bottom Sheet"
onPress={() => sheetRef.current.snapTo(0)}
/>
<Button
title="Close Bottom Sheet"
onPress={() => sheetRef.current.snapTo(1)}
/>
<BottomSheet
ref={sheetRef}
snapPoints={[450, 0]}
initialSnap={1}
borderRadius={30}
renderContent={renderContent}
/>
hey, did u find any workaround for this issue ?
You need to follow the instructions for installing react-native-gesture-handler
here:
https://docs.swmansion.com/react-native-gesture-handler/docs/#installation
You need to follow the instructions for installing
react-native-gesture-handler
here:https://docs.swmansion.com/react-native-gesture-handler/docs/#installation
I think this problem deal with the AndroidX migrate, and the react-native gesture handler isn't compatible yet with AndrodX
I also had this problem. In my case, I didn't follow react-native-gesture-handler instructions properly. If you are using wix/react-native-navigation, you need to follow some additional react-native-gesture-handler instructions
https://docs.swmansion.com/react-native-gesture-handler/docs/#with-wixreact-native-navigation
Just wrap your component with <GestureHandlerRootView style={{flex:1}}> {props.children} </GestureHandlerRootView>
by importing it from react-native-gesture-handler.