- In App.js, let's import the dependencies we'll need for our app:
import React from 'react'; import { StyleSheet, Text, View } from 'react-native';
- Our application only needs a render method since we're building a static layout. The rendered layout consists of a container View element and three child View elements for each colored section of the app:
export default class App extends React.Component { render() { return ( <View style={styles.container}> <View style={styles.topSection}> </View> <View style={styles.middleSection}></View> <View style={styles.bottomSection}></View> </View> ); } }
- Next, we can begin adding our styles. The first style we'll add will be applied to the View element that wraps our entire ...