Getting Started
Installation
This library requires the following packages to be installed correctly:
- react-native-gesture-handler
- react-native-reanimated
- react-native-svg
- react-native-haptic-feedback
- react-native-image-picker
- @react-native-masked-view/masked-view
- npm
- Yarn
npm install @nomada-sh/react-native-eyecandy
yarn add @nomada-sh/react-native-eyecandy
Installing dependencies into an Expo managed project
In your project directory, run:
expo install react-native-gesture-handler react-native-reanimated react-native-svg react-native-haptic-feedback react-native-image-picker @react-native-masked-view/masked-view
To finalize installation of
react-native-gesture-handler
, add the following at the top (make sure it's at the top and there's nothing else before it) of your entry file, such asindex.js
orApp.js
:import 'react-native-gesture-handler';
Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms.
To finalize installation of
react-native-reanimated
, add Reanimated's babel plugin to yourbabel.config.js
:module.exports = {
plugins: ['react-native-reanimated/plugin'],
};After you add the Babel plugin, restart your development server and clear the bundler cache:
expo start --clear
Installing dependencies into a bare React Native project
In your project directory, run:
- npm
- Yarn
npm install react-native-gesture-handler react-native-reanimated react-native-svg react-native-haptic-feedback react-native-image-picker @react-native-masked-view/masked-view
yarn add react-native-gesture-handler react-native-reanimated react-native-svg react-native-haptic-feedback react-native-image-picker @react-native-masked-view/masked-view
From React Native 0.60 and higher, linking is automatic. So you don't need to run
react-native link
.If you're on a Mac and developing for iOS, you need to install the pods (via Cocoapods) to complete the linking.
npx pod-install ios
To finalize installation of
react-native-gesture-handler
, add the following at the top (make sure it's at the top and there's nothing else before it) of your entry file, such asindex.js
orApp.js
:import 'react-native-gesture-handler';
Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms.
To finalize installation of
react-native-reanimated
, configure it following the installation guide.