Installation
React Native Reanimated v4 Users
If you're using React Native Reanimated v4, version 2.x of this library is recommended for the best experience.
While v1.x may work with Reanimated v4, it's optimized for v3 and you might encounter deprecation warnings or compatibility issues.
Important
react-native-gesture-image-viewer is a high-performance viewer library built on react-native-reanimated and react-native-gesture-handler.
Therefore, you must install React Native Reanimated and Gesture Handler before using this library. Please refer to the official documentation of these libraries for detailed setup guides.
Minimum Requirements
React Native Reanimated Setup
Add the plugin to your babel.config.js:
babel.config.js
Wrap your Metro config with wrapWithReanimatedMetroConfig in metro.config.js:
metro.config.js
React Native Gesture Handler Setup
react-native-gesture-handlergenerally doesn't require additional setup, but please refer to the official documentation for your specific environment.- For using gestures in Android modals, you would normally need to wrap modal content with
GestureHandlerRootView. However, this library already includesGestureHandlerRootViewinternally, so no additional wrapping is needed when using modals.
Install React Native Gesture Image Viewer
You’re all set! 🎉
Start by installing react-native-gesture-image-viewer
