Created
November 22, 2018 10:39
-
-
Save thecookieorg/7e26cf511d0efab68d4bc7f84fd021bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Text } from 'react-native'; | |
class User extends Component { | |
render() { | |
return ( | |
<View> | |
<Text>Username: {this.props.name}</Text> | |
<Text>Phone number: {this.props.phone}</Text> | |
<Image source={this.props.avatar} style={{ width: 200, height: 150 }} /> | |
</View> | |
); | |
} | |
} | |
export default class AllUsers extends Component { | |
render() { | |
return ( | |
<View> | |
<User | |
name="Manoylo" | |
phone="1231234" | |
avatar="https://api.adorable.io/avatars/285/abottf.png" | |
/> | |
<User | |
name="James Franco" | |
phone="+156789120" //not his actual phone number :) | |
avatar="https://api.adorable.io/avatars/285/james.png" | |
/> | |
</View> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment