首页指南参考教程
This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 51).

GestureHandler

A library that provides an API for handling complex gestures.

Android
iOS
Web

react-native-gesture-handler is a library for handling complex gestures. From it's README:

This library provides an API that exposes mobile platform-specific native capabilities of touch and gesture handling and recognition. It allows for defining complex gesture handling and recognition logic that runs 100% in the native thread and is therefore deterministic.

Installation

Terminal
npx expo install react-native-gesture-handler

If you are installing this in an existing React Native app (bare workflow), start by installing expo in your project. Then, follow the additional instructions as mentioned by library's README under "Installation in bare React Native projects" section.

Usage

Read the react-native-gesture-handler documentation for more information on the API and usage.

Expo 中文网 - 粤ICP备13048890号