mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-08 22:44:14 +08:00
11 lines
399 B
JavaScript
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;
|
|
};
|