UNPKG

react-native-gesture-handler

Version:

Declarative API exposing native platform touch and gesture system to React Native

19 lines (15 loc) 543 B
import { startListening } from './handlers/gestures/eventReceiver'; import RNGestureHandlerModule from './RNGestureHandlerModule'; import { isFabric } from './utils'; let fabricInitialized = false; export function initialize() { startListening(); } // Since isFabric() may give wrong results before the first render, we call this // method during render of GestureHandlerRootView export function maybeInitializeFabric() { if (isFabric() && !fabricInitialized) { RNGestureHandlerModule.install(); fabricInitialized = true; } }