mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-09 17:04:43 +08:00
Initial commit
This commit is contained in:
10
packages/stack/src/utils/ReactNativeFeatures.js
Normal file
10
packages/stack/src/utils/ReactNativeFeatures.js
Normal file
@@ -0,0 +1,10 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user