UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

33 lines (31 loc) 1.04 kB
'use strict'; import { logger } from "../logger/index.js"; import { isChromeDebugger, isJest, shouldBeUseWeb } from "../PlatformChecker.js"; export let setGestureState; function setGestureStateNative(handlerTag, newState) { 'worklet'; if (!_WORKLET) { logger.warn('You can not use setGestureState in non-worklet function.'); return; } global._setGestureState(handlerTag, newState); } function setGestureStateJest() { logger.warn('setGestureState() cannot be used with Jest.'); } function setGestureStateChromeDebugger() { logger.warn('setGestureState() cannot be used with Chrome Debugger.'); } function setGestureStateDefault() { logger.warn('setGestureState() is not supported on this configuration.'); } if (!shouldBeUseWeb()) { setGestureState = setGestureStateNative; } else if (isJest()) { setGestureState = setGestureStateJest; } else if (isChromeDebugger()) { setGestureState = setGestureStateChromeDebugger; } else { setGestureState = setGestureStateDefault; } //# sourceMappingURL=setGestureState.js.map