- Create Components folder under src folder
- Add TextEXP.js file and add below Code
import React from "react";
import { Text, View, ScrollView } from "react-native";
const HorizontalScrollViewEXP1 = () => {
return (
<View>
<View>
<ScrollView horizontal={true}>
<Text>
Scroll Me To See The Effect data data data data data data data data
data data data data data data data
</Text>
<Text>=> Scroll View Ends Here.</Text>
</ScrollView>
</View>
</View>
);
};
export default HorizontalScrollViewEXP1;
- Open App.js file and update code as below
import React from 'react';
import { View,StyleSheet } from 'react-native';
import HorizontalScrollViewEXP1 from './src/Component/HorizontalScrollViewEXP1'
const App=()=> {
return (
<View style={styles.container}>
<HorizontalScrollViewEXP1/>
</View>
);
}
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
paddingTop:80
},
});
No comments:
Post a Comment