Running Example App

Example app code is located under Example/ folder in the repo. It showcases the majority of the Gesture Handler library features. The app consist of the list of single screen examples presenting the capabilities of the library. Each example is located under a separate folder under Example/.

Running example app on Expo

You can run example app on Expo. Follow instructions under this link to do so. Note that the app published to Expo is not the most up to date version. We publish updates whenever new version of Expo SDK is released. If you wish to try the most up to date version you will have to run example app locally. For that see below 👇

Running example app locally

Before you begin you should follow React Native's setup steps to make sure you have all the tools necessary to build and run React Native apps installed. The example app is a regular React Native app, so in case of problems or to learn about available commands you may want to check react-native cli documentation.

In order to run example app you need to clone the repo first:

git clone [email protected]:software-mansion/react-native-gesture-handler.git

Then go to the library folder:

cd react-native-gesture-handler/

Install dependencies of library with the following command:

yarn

Then go to the Example folder:

cd Example

Install dependencies of example with the following command:

yarn

Run development server:

yarn start

Finally run one of the commands below in order to build, install and launch the app on Android:

react-native run-android

or on iOS:

react-native run-ios

You will need to have an Android or iOS device or emulator connected and react-native-cli package installed globally.