In React Native, how do you do interactive touch and hold-to-hold modes like Instagram?

Instagram has a really cool interaction where you can click and hold, just like a longPress, image, and an interactive popup appears. Once it appears, you can drag your finger to one of the action buttons, and removing the finger applies the action and closes the pop-up window.

Here it is in action. And here is a link to the video if you need to take a closer look.
instagram interaction

In my application, a popup window with touch and hold works, but dragging a finger continues to control the main view.

How do you get finger interaction to go to the popup?
How do you get drag-and-drop buttons?

+6
source share
1 answer

This is what you can achieve with PanResponder. Using Pan Responder, you basically create your own touch components. Click here for documents.

You will also need an Animated API to animate transitions.

0
source

Source: https://habr.com/ru/post/1679482/


All Articles