App03Greetings.js 511 B

1234567891011121314151617181920212223242526272829
  1. import React from "react";
  2. import {
  3. Text,
  4. View,
  5. } from 'react-native';
  6. import styles from "../styles";
  7. class Greeting extends React.Component {
  8. render() {
  9. return (
  10. <Text>Hello {this.props.name}!</Text>
  11. );
  12. }
  13. }
  14. class LotfOfGreetings extends React.Component {
  15. render() {
  16. return (
  17. <View style={styles.container}>
  18. <Greeting name="Rexxar" />
  19. <Greeting name="Jaina" />
  20. <Greeting name="Valeera" />
  21. </View>
  22. );
  23. }
  24. }
  25. export default LotfOfGreetings;