Questions tagged [react-native-gesture-handler]

263 questions
0
votes
0 answers

React Navigation: Should I manually set higher versions for react-native-gesture-handler and react-native-reanimated?

I'm using react-native@69.10 in my React Native app, and am adding a Drawer Navigator. I have @react-navigation/drawer@6.6.2. The docs say to run npm install react-native-gesture-handler react-native-reanimated which installs…
0
votes
1 answer

How to set activeOffsetX of PanGestureHandler in react native

I have a list of messages and I'm making feature swipe to reply using PanGestureHandler, I want to limit area swipeable by props activeOffsetX, how can I achieve this?enter image description here > enabled={!isInfoText} >…
0
votes
0 answers

react native gesture handler with android

invariant violation requirenativecomponent RNGestureHandlerRootview was not found in the ui manager when integrating react application bundle in existing android application. When i individually run the react native app it works fine but when…
0
votes
0 answers

React Native Swipeable - How to shrink content instead of pushing content out of the view when swiping

I am using React Native Swipeable component from React Native Gesture Handler. https://docs.swmansion.com/react-native-gesture-handler/docs/api/components/swipeable/ The original behaviour: When user swipe element right, it pushes content out of the…
0
votes
1 answer

React Native Swipeable - How to prevent auto closing after executing onSwipeableOpen

I am using React Native Swipeable for "swipe to select" functionality in the mobile app I am working on. I have a list of invoices. Each invoice is swipeable. When user swipe right, it displays selected checkbox in the left menu and invoice number…
0
votes
0 answers

react native gesture handler example not rendering multiple balls + coordinate mismatch

React Native Gesture Handler has a tutorial here that describes a simple ball animation. From their code on github, I modified the example slightly to allow multiple balls to spawn from a tap gesture at the top level. However, the balls are not…
0
votes
2 answers

Gesture handler stuck when navigate React Native

I have a tab gesture with inner buttons. But the thing is if navigate with any gesture (with inner buttons or the first tap gesture) app just doesn't tab any other button again or scroll. I really have no idea what is the problem. Or there are any…
0
votes
0 answers

React Native: Pan to zoom resets scale to 1 on start

I'm making a React Native app where the user can pinch to zoom in on a map using react-native-gesture-handler. It works correctly when the first pinch is released (e.g 1.8x scale) but when the user pinches to zoom a second time, it resets the scale…
Chris Wickham
  • 521
  • 2
  • 5
  • 19
0
votes
0 answers

React Native Expo: Swipe Animation with React Native Gesture Handler and Animated

I have an array of images stored in my redux. I've created a swipe gesture and a swipe animation to go with it. It all works fine except for this line of code: const translationX = useRef(new Animated.Value(0)).current; It console logs as 0, which…
0
votes
0 answers

is useAnimatedGestureHandler still valid with react-native-gesture-handler in 2023

I am concerned about the proper way of using react-native-gesture-handler, the documentation says that Gesture Handlers are deprecated and I should be using GestureDetector, the context is that I need to combine gestures, and when I try to do it…
0
votes
0 answers

React native Gesture Detector and Animated.View error 'Value is undefined, expected an Object'

I was designing an app and tried to make a bottom sheet. I used 'Animated.View' inside 'Gesture Detector' and I am getting error 'Value is undefined, expected an Object'. The code is this import {Dimensions, StyleSheet, View} from…
0
votes
0 answers

Gesture LongPress runOnJs Callback Stale

I'm trying to pass the chatMessage as a callback on LongPress. It works great the first time, but when the component re-renders it does not update the longPressGesture callback with the new chatMessage value. The longPressGesture has the previous…
0
votes
0 answers

Is there any way to set a limit on sharedvalue in react native reanimated

I am adding some gestures in my app to an image (same as we have in whatsapp, open any contact's profile picture in full mode and see the pinch, translation and other gestures). I already applied single tag, double tap and also pinch gestures and…
0
votes
0 answers

Error: Unexpected token: punc (.) in file node_modules/react-native-gesture-handler/src/handlers/ForceTouchGestureHandler.ts

I am setting up Detox e2e test for my new RN app but there is an issue when I build app with mode release My build command: xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Release -sdk iphonesimulator -derivedDataPath…
0
votes
0 answers

error when importing createDrawerNavigator TypeError: null is not an object (evaluating '_RNGestureHandlerModule.default.Direction')

I am trying to integrate sidebar in react native app by this documentation https://reactnavigation.org/docs/drawer-based-navigation/. I down grated the react native version to 0.67.0 v as mentioned here…