UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

24 lines (22 loc) 872 B
'use strict'; import { executeOnUIRuntimeSync } from 'react-native-worklets'; import { DEFAULT_LOGGER_CONFIG, IS_WEB, ReanimatedError, registerLoggerConfig, SHOULD_BE_USE_WEB } from './common'; import { initSvgCssSupport } from './css/svg'; import { getStaticFeatureFlag } from './featureFlags'; export function initializeReanimatedModule(ReanimatedModule) { if (!IS_WEB && !ReanimatedModule) { throw new ReanimatedError('Tried to initialize Reanimated without a valid ReanimatedModule'); } if (getStaticFeatureFlag('EXPERIMENTAL_CSS_ANIMATIONS_FOR_SVG_COMPONENTS')) { initSvgCssSupport(); } } registerLoggerConfig(DEFAULT_LOGGER_CONFIG); if (!SHOULD_BE_USE_WEB) { executeOnUIRuntimeSync(() => { 'worklet'; global._tagToJSPropNamesMapping = {}; registerLoggerConfig(DEFAULT_LOGGER_CONFIG); })(); } //# sourceMappingURL=initializers.js.map