React Native ScrollView

ScrollView :- ScrollView is a Scrolling container its store multiple components and View.You Can scroll Vertical and horizontal.

App Name :- Test

Component Name: App.js

----------------------------------------------------------------------------------------------------------------------

import React, { Component } from 'react'
import {createAppContainer} from 'react-navigation'
import {createStackNavigator} from 'react-navigation-stack'
import { View, Text, Button,StyleSheet, TextInput,height,width } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
// import Home from './Component/Home'
class App extends React.Component {
render()
{
return(
<ScrollView>

<View style={{height:200,width:200,backgroundColor:'green'}}></View>
<View style={{height:200,width:200,backgroundColor:'yellow'}}></View>
<View style={{height:200,width:200,backgroundColor:'red'}}></View>
<View style={{height:200,width:200,backgroundColor:'green'}}></View>
<View style={{height:200,width:200,backgroundColor:'green'}}></View>
<View style={{height:200,width:200,backgroundColor:'yellow'}}></View>
<View style={{height:200,width:200,backgroundColor:'red'}}></View>
<View style={{height:200,width:200,backgroundColor:'green'}}></View>


</ScrollView>

)
}
}

export default App;

Comments

Popular posts from this blog

React Native FlatList

React Native class component