import React from 'react';
import { View, Text, Button, StyleSheet } from 'react-native';
export default function CrossPlatformInfo({ navigation }) {
return (
<View style={styles.container}>
<Text style={styles.header}>React Native Info</Text>
<View>
<Text style={styles.bulletPoint}>• Uses JavaScript</Text>
<Text style={styles.bulletPoint}>• Shares code on iOS and Android</Text>
<Text style={styles.bulletPoint}>• Native UI elements</Text>
<Text style={styles.bulletPoint}>• Faster development</Text>
</View>
<Button title="Back" onPress={() => navigation.goBack()} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 20,
justifyContent: 'space-between',
backgroundColor: '#fff'
},
header: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 20
},
bulletPoint: {
fontSize: 18,
marginBottom: 10
}
});This screen uses React Native components to show why React Native is good for building apps that work on both iOS and Android.
The header uses a large bold Text. The bullet points explain key benefits in simple lines with a bullet symbol.
The Back button uses the navigation prop to go back to the previous screen, making the app easy to navigate.
The layout uses flexbox to space the content nicely with padding and spacing.