mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 22:47:02 +08:00
Merge pull request #16 from Minishlink/patch-1
Minimal support for other platforms
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
View,
|
||||
UIManager,
|
||||
StyleSheet,
|
||||
Platform,
|
||||
} from 'react-native';
|
||||
|
||||
let USE_SCREENS = false;
|
||||
@@ -22,14 +23,16 @@ export function screensEnabled() {
|
||||
return USE_SCREENS;
|
||||
}
|
||||
|
||||
const NativeScreen = Animated.createAnimatedComponent(
|
||||
requireNativeComponent('RNSScreen', null)
|
||||
);
|
||||
const isPlatformSupported = ['android', 'ios'].includes(Platform.OS);
|
||||
|
||||
const NativeScreenContainer = requireNativeComponent(
|
||||
const NativeScreen = isPlatformSupported ? Animated.createAnimatedComponent(
|
||||
requireNativeComponent('RNSScreen', null)
|
||||
) : null;
|
||||
|
||||
const NativeScreenContainer = isPlatformSupported ? requireNativeComponent(
|
||||
'RNSScreenContainer',
|
||||
null
|
||||
);
|
||||
) : null;
|
||||
|
||||
export class Screen extends React.Component {
|
||||
setNativeProps(props) {
|
||||
|
||||
Reference in New Issue
Block a user