UNPKG

react-native-gesture-handler

Version:

Experimental implementation of a new declarative API for gesture handling in react-native

15 lines (11 loc) 534 B
import { unregisterHandler } from '../../handlersRegistry'; import RNGestureHandlerModule from '../../../RNGestureHandlerModule'; import { scheduleFlushOperations } from '../../utils'; import { AttachedGestureState } from './types'; export function dropHandlers(preparedGesture: AttachedGestureState) { for (const handler of preparedGesture.attachedGestures) { RNGestureHandlerModule.dropGestureHandler(handler.handlerTag); unregisterHandler(handler.handlerTag, handler.config.testId); } scheduleFlushOperations(); }