Files
react-navigation/packages/stack/src/utils/ReactNativeFeatures.js
2018-08-03 14:59:12 -07:00

11 lines
399 B
JavaScript

import { NativeModules } from 'react-native';
const { PlatformConstants } = NativeModules;
export const supportsImprovedSpringAnimation = () => {
if (PlatformConstants && PlatformConstants.reactNativeVersion) {
const { major, minor } = PlatformConstants.reactNativeVersion;
return minor >= 50 || (major === 0 && minor === 0); // `master` has major + minor set to 0
}
return false;
};