The basics of PinchGestureHandler with React Native Reanimated 2

Опубликовано: 10 Октябрь 2024
на канале: Reactiive
22,763
506

In this tutorial we’ll learn how to use the PinchGestureHandler component (from react-native-gesture-handler package). In order to do that we'll build the classical "Pinch Image" animation.

My React Native animations course: https://www.reanimate.dev

Written article: https://www.reactiive.io/articles/pin...

Support me on Patreon:   / reactiive   🤓
Follow me on Twitter:   / reactiive_  

Source code: https://github.com/enzomanuelmangano/...

The main concepts we'll explore are:
PinchGestureHandler
focalX + focalY
useAnimatedGestureHandler hook
withTiming

The basics of PanGestureHandler:    • The basics of PanGestureHandler with ...  

If you like this tutorial, don't forget to subscribe to the channel :)

Chapters:
00:00 Introduction
00:45 Setup workspace
02:48 The PinchGestureHandler
07:35 The magical onEnd callback
09:16 The focal point
12:35 Pinch around the focal point