Skip to content

Instantly share code, notes, and snippets.

@Louiefigz
Created June 26, 2017 19:37
Show Gist options
  • Select an option

  • Save Louiefigz/20b382decd19c7680b36e248412a55df to your computer and use it in GitHub Desktop.

Select an option

Save Louiefigz/20b382decd19c7680b36e248412a55df to your computer and use it in GitHub Desktop.
import React from 'react';
import { ScrollView, Text, StyleSheet, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.background}>
<ScrollView >
{this.props.text.map((item)=>
<Text style={styles.font}>{item}</Text>
)}
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
background:{
marginTop: 100,
marginLeft: 100
},
font:{
fontSize: 30,
}
})
App.defaultProps = {
text: ['Burger King', 'McDonalds', 'Red Lobster', 'Dennys', 'Wendys', 'White Castle', 'popeyes']
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment