
Props react native example
#Code Example
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Hello World From REact Native dev</Text>
<Welcome name="TB" />
</View>
);
}
const Welcome = (props) => {
return (
<View>
<Text>
Hell {props.name}
</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Output

Leave a Comment