Created
November 29, 2017 05:40
-
-
Save himelnagrana/5141e233bf6a0f15baa8d77f0cc18c48 to your computer and use it in GitHub Desktop.
Sample React Native Code
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 { Image, ScrollView, Text } from 'react-native'; | |
class AwkwardScrollingImageWithText extends Component { | |
render() { | |
return ( | |
<ScrollView> | |
<Image | |
source={{uri: 'https://i.chzbgr.com/full/7345954048/h7E2C65F9/'}} | |
style={{width: 320, height:180}} | |
/> | |
<Text> | |
On iOS, a React Native ScrollView uses a native UIScrollView. | |
On Android, it uses a native ScrollView. | |
On iOS, a React Native Image uses a native UIImageView. | |
On Android, it uses a native ImageView. | |
React Native wraps the fundamental native components, giving you | |
the performance of a native app, plus the clean design of React. | |
</Text> | |
</ScrollView> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment