- Let's start by opening App.js and adding our imports. The imports include the UserForm component that we'll be building out in a later step:
import React from 'react';import { Alert, StyleSheet, ScrollView, SafeAreaView, Text, TextInput,} from 'react-native';import UserForm from './UserForm';
- Since this component is going to be very simple, we are going to create a stateless component for our App. We will only render a top toolbar inside a ScrollView for the UserForm component:
const App = () => ( <SafeAreaView style={styles.main}> <Text style={styles.toolbar}>Fitness App</Text> <ScrollView style={styles.content}> <UserForm /> </ScrollView> </SafeAreaView>); const styles = StyleSheet.create({ // Defined in a later step ...