How can I trigger the default swipe events of multiple components with a swipe from anywhere on the screen in react native? - react-native

I am using react native with expo. I have created a Carousel with react-native-snap-carousel and a material-top-tab-navigator with react-navigation 6.
My goal is, that when I swipe through the tab navigator the carousel should also detect the swipe and react as if it would get swiped itself. So whereever I swipe on the screen inside the tab navigator, the carousel should join the swipe action so to say.
Right now I can obviously only swipe through it when I place my finger inside its borders. Should I use react-native-gesture-handler or is there some way to connect or bundle the two events together so that when one component gets swiped, the same swipe gets apllied to the other component?

Related

swipe to go main screen react native

I want to be able to swipe left from my 'profile' screen to go to my 'dms' screen. How would I do this on react native?
I've got a stack navigator for my screens so far.
I was thinking I need to use the 'swipeable' component but not sure how to use it to navigate

How could i make pagination with button and swiper in react native

I tried to do with ScrollView and transform and scrollTo but i couldnt figure it out and i dont want to create with react-navigation
i want to create a fixed bar at the top and two animated buttons in it and when button touched go second screen and play button animation and when screen swiped play button animation also
like this and screen has to be slideable too

React Native - Drawer Navigation Gesture Start point

I'm using React native drawer navigation, when you swipe out from the left or right - it opens the drawer.
Does anyone know a way of changing the gesture start point, so that it starts slightly further into the screen?
My users are finding on curved screens it doesn't always drag out and feels un-natural to use.
I've looked through the documentation and couldn't find anything there.
Thank you!
Use edgeWidth props in react-navigation drawer.
edgeWidth-
Allows for defining how far from the edge of the content view the swipe gesture should activate.
For more details https://reactnavigation.org/docs/drawer-navigator/#edgewidth

React Native add gestures between 4 specific screens

I have a React Native app using react-navigation.
I would like to swipe gestures between 4 specific screens of a StackNavigator. From screen A, I want to access screen B on swipe left, screen C on swipe right and screen D on swipe up. And then from screen B for example, if I swipe right, I get back on screen A, etc.
I couldn't find anything in React Navigation 3.x that fitted my use case. Any recommandations, maybe in react-native-gesture-handler ?
I looked up this link already: How to swipe horizontally inside stackNavigator screens?
You need to make your own custom navigator for that (probably based on tab router): https://reactnavigation.org/docs/en/custom-navigators.html
Stack navigator is not made for the use case you're describing.

React Navigation navigate and scroll

I'm using the StackNavigator from react-navigation and I'm trying to customize the navigation process.
On one screen, I have two buttons that both use the "navigate" function to redirect the user to the same screen (which is a scrollview). Is there any way to have one of the buttons scroll down to a different part of the screen after navigating?