constSpecificPlatformComponent = Platform.select({ ios: () =><Text>I am use IOS</Text>, android: () =><Text>I am use Android</Text>, });
exportdefaultclassAppextendsReact.Component { render() { return ( <Viewstyle={styles.container}> <Text>Open up App.js to start working on your app!</Text> <SpecificPlatformComponent /> </View> ); } }
constSpecificPlatformComponent = Platform.select({ ios: () =><Text>I am use IOS</Text>, android: () =><Text>I am use Android</Text>, });
constSpecificPlatformVersionComponent = Platform.select({ ios: () =><Text>my Iphone Version is {Platform.Version}</Text>, android: () =><Text>my Android Version is {Platform.Version}</Text>, });
exportdefaultclassAppextendsReact.Component { render() { return ( <Viewstyle={styles.container}> <Text>Open up App.js to start working on your app!</Text> <SpecificPlatformComponent /> <SpecificPlatformVersionComponent /> </View> ); } }