- Let's start by importing all the dependencies we'll need in App.js, as follows:
import React from 'react';import glamorous from 'glamorous-native';
- Our app will need a containing View element to hold all of the other components displayed in the app. Instead of styling this element with an object passed to the StyleSheet component, like we've been doing in all previous recipes, we'll use glamorous by passing a style object to the view method, which returns a styled View component that we store in a const called Container for later use, as follows:
const Container = glamorous.view({ flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#fff',});
- Similarly, we'll add three styled Text components using ...