-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS: Expo 47] velocity is 0
in useAnimatedGestureHandler
#3758
Comments
onEnd
velocity is 0
with useAnimatedGestureHandler
onEnd
velocity is 0
in useAnimatedGestureHandler
onEnd
velocity is 0
in useAnimatedGestureHandler
0
in useAnimatedGestureHandler
same for me |
@jjenzz Any feedback from this? |
@tbaustin nope, nothing to report unfortunately |
same for me
|
Same for me (expo 48), const gestureHandler = useAnimatedGestureHandler({
onStart: (_, context: any) => {
context.startY = offset.value;
},
onActive: (event, context) => {
offset.value = event.translationY + context.startY;
},
onEnd: (event) => {
offset.value = withDecay({
velocity: event.velocityY / 5,
});
},
}); package.json:"dependencies": {
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"expo": "~48.0.15",
"react": "18.2.0",
"react-native": "0.71.7",
"react-native-gesture-handler": "~2.9.0",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-web": "~0.18.10"
...
}, babel.config.jsmodule.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
// required for reanimated - web
// https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support/
'@babel/plugin-proposal-export-namespace-from',
'react-native-reanimated/plugin',
],
};
}; Works without issues on Android/iOS devices and Web. |
any updates? |
I have managed to make it work by upgrading to sdk 49
|
If your problem is iOS only with |
Description
With Expo 47 on iOS, I'm always getting a
0
value when trying to access theevent.velocityY
property inuseAnimatedGestureHandler
.Steps to reproduce
npx create-expo-app reanimated-velocity
npx expo install react-native-reanimated
npx expo install react-native-gesture-handler
babel.config.js
to includereact-native-reanimated/plugin
App.js
and thennpm run ios
0
Snack or a link to a repository
https://github.com/jjenzz/reanimated-velocity
Reanimated version
2.12.0
React Native version
0.70.5
Platforms
iOS
JavaScript runtime
No response
Workflow
Expo managed workflow
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone X iOS 15.4
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: