Questions tagged [react-native-gesture-handler]
263 questions
0
votes
1 answer
After Setting State, Second Drag Not Animated - React Native, Expo, PanGestureHandler
I throw myself on your mercy asking for help figuring out why, in React Native using reanimated and PanGestureHandler, I can drag an object once, but when the gesture event ends and I update state, the secont->Nth drag animation doesn't happen…

aproximation
- 491
- 4
- 13
0
votes
0 answers
React Native: Rendered more hooks than during previous render by useRef in react-native-reanimated
In my RN 0.62.2 app, there is an error after the declaration of animated value is changed to use useRef. The code without error was:
import Animated from 'react-native-reanimated';
import {Value} from Animated;
const dragX = new Value(0);
Since it…

user938363
- 9,990
- 38
- 137
- 303
0
votes
1 answer
React Native: panGestureHandler stops working after re-rendering
There is a simple drag animation in my 0.62.2 app. The drag was implemented with react-native-gesture-handler 1.6.1 and react-native-reanimated 1.10.1. The dragged item is an image in a square grid. There are 2 grid or 3 grids in a row to display…

user938363
- 9,990
- 38
- 137
- 303
0
votes
1 answer
Why is metro builder unable to resolve a 'main' module specified within react-native-gesture-handler?
So I installed the react-navigation 5.x following the documentation, and after pasting the import 'react-native-gesture-handler'; in my index.js and internal error popped up stating it couldn't resolve some 'main' module which is specified in the…

Mi8Guy
- 37
- 9
0
votes
1 answer
RN gesture handler: 1 image is dragged but 2 images are moving together
In my React Native 0.62.2 app, react-native-gesture-handler 1.6.1 and react-native-animated 10.10.1 are used to make image grid draggable. The problem is that all uploaded images grids are moving together instead of individually draggable. Here is…

user938363
- 9,990
- 38
- 137
- 303
0
votes
1 answer
PanGestureHandler: Bottom to top resets to bottom and then animates
I have attached the snack for better clarity. I am trying to achieve an animation similar to the iOS/Android notification bar.
I am successfully able to drag the handlebar to the bottom using the below-given code:
const translateY = cond(
…

shet_tayyy
- 5,366
- 11
- 44
- 82
0
votes
1 answer
How to add loadmore with text or icon view in Flatlist/ Scrollview react native
I want to add view when user swipe to latest item and have to hard swipe to do action or can see the view.
Like this Tiktok app (Example)
Did anyone have any ideas for this?
Thanks all

vinh tran
- 11
- 2
0
votes
1 answer
BottomSheet animation in react-native doesnt work properly for the first time
I'm trying to create this animation for my bottomsheet ,so initially when my homescreen loads, the bottomsheet pops up from below with a spring animation and then when the user swipes up , the bottomsheet also swipes up witha spring animation to it,…

Rahul Halder
- 1
- 3
0
votes
1 answer
Why are two separate components sharing state in React Native?
I'm trying to implement multi-touch slider functionality (based on the example code provided by React Native Gesture Handler).
I'm finding that when I create two TapOrPan components, they work fine individually but the slider state is shared when…

linqo
- 617
- 4
- 16
0
votes
1 answer
react-native custom slider, using `diffClamp`
I have made a custom slider which can be seen here.
The problem is with the following snippet
let transX = cond(
eq(gestureState, State.ACTIVE),
diffClamp(add(offsetX, dragX), 0, 200),
set(offsetX, add(offsetX, dragX)),
);
I am able to limit…

Giridhar Karnik
- 2,213
- 4
- 27
- 47
0
votes
1 answer
Moving box from bottom to top using React Native PanGestureHandler
I want to slide a box from bottom to top. I used diffClamp to limit the distance of the slider. I tried many ways to do this but couldn't find a solution for this.
In following code snippet i was able to slide from top to bottom. In that also I have…

Amila Dulanjana
- 1,884
- 1
- 16
- 33
0
votes
1 answer
Can't find variable (functionName()) when updating parent State from child component in React Native
I'm trying to update the position of a card in a parent component in react natvive.
My parent component has this:
class JarList extends React.Component {
state = {
position: { width: cardWidth, height: cardHeight, x: initialCardX, y:…

Aresky
- 17
- 6
0
votes
1 answer
General Problems with ReactNative #1: RCT.RootContentView.h file not found ReactNativeGestureHandler.m
This problem arises when there the version of ReactNativeGestureHandler installed during NPM Install isn't compatible with the installed React-Native version.

Kai
- 331
- 1
- 3
- 13
0
votes
2 answers
React navigation crashing when clicking anywhere on screen
Android Emulator Environment: Pixel_3_XL_API_29
Whenever I use any react-navigation component such as stack or drawer in my expo-based app, and click anywhere on the screen with a mouse, it crashes.
If I remove
in the below…

user1432882
- 1,126
- 4
- 14
- 29
0
votes
1 answer
controlling the speed of panning a view in react native
I am using this to implement panning on an animated.view
https://software-mansion.github.io/react-native-gesture-handler/docs/handler-pan.html
This animated view also has pinch and zoom enabled using the same library

zoonosis
- 799
- 1
- 11
- 30