Skip to content

Instantly share code, notes, and snippets.

@karanjagota
Created October 22, 2020 18:25
Show Gist options
  • Save karanjagota/2d53cf53635617e60984df9c1a743cac to your computer and use it in GitHub Desktop.
Save karanjagota/2d53cf53635617e60984df9c1a743cac to your computer and use it in GitHub Desktop.
import React from 'react';
import { StyleSheet, Text, View,ScrollView } from 'react-native';
export default function App() {
const arr = [1,2,3,4,5,6,7,8,9,10,11,12];
return (
<ScrollView>
{
arr.map((num)=>
<View>
<Text style={styles.textstyle}>Scrollable Content Text {num}</Text>
</View>
)}
</ScrollView>
);
}
const styles = StyleSheet.create({
textstyle: {
fontSize:18,
backgroundColor: '#00B0FF',
marginBottom: 5,
color:'#000000',
padding:20,
textAlign: 'center',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment