Swipeable not working with react-navigation/native-stack
See original GitHub issueDescription
Hello, I recently upgraded react-navigation v4 to v6 and my Swipeable
gesture stopped working since then. After some manual git bisect I found that passing from @react-navigation/stack to @react-navigation/native-stack was the problem. I am using Android only so I don’t really know if it’s not working either for iOS.
Platforms
- iOS
- Android
- Web
Steps To Reproduce
- Create main native stack + nested native stack
- add a Swipeable to a screen inside that nested stack
- Running on Expo android simulator works fine, but swipeable is not responding on real device
Snack or minimal code example
https://snack.expo.dev/@aqmebrak/swipeable-bug
Package versions
“react-native-screens”: “3.10.1”, “@react-navigation/native”: “^6.0.6”, “@react-navigation/routers”: “^6.1.0”, “@react-navigation/native-stack”: “^6.0.6”, “react-native-gesture-handler”: “1.10.3”, “react-native-safe-area-context”: “3.3.2”
- React: 17
- React Native: 0.64.3
- React Native Gesture Handler: 1.10.3
- React Native Reanimated: -
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Swipe back is not working · Issue #6809 · react-navigation ...
swipe back is not work on iOS 13. Expected Behavior. It should work line in stack navigator. How to reproduce.
Read more >Swipe Gesture not working in React Navigation v6 in IOS build
The open/close function on a button click is working fine but Swipe gesture is not responding.
Read more >Stack Navigator | React Navigation
Stack Navigator provides a way for your app to transition between screens where each new screen is placed on top of a stack....
Read more >Swipeable is not working on android? - React Native
here is my MessagesScreen.js import React from 'react'; import { FlatList, StyleSheet, View} from 'react-native'; import ListItem from '.
Read more >react-native-swipeable-tabs - npm package - Snyk
Learn more about react-native-swipeable-tabs: package health score, popularity, ... or change in issues status has been detected for the GitHub repository.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Could you check if wrapping your app with
GestureHandlerRootView
solves the issue for you? It can be done like so:Happy to hear that suggestion resolved the issue. I though that when no root view is present we detect that and show some special error, is that not the case @j-piasecki ?
Also, I understand we can consider this issue resolved, so it should be safe to close it.