How to do it...

  1. We'll start by adding the imports we'll be using in the App component in App.js. While this app won't have much functionality, we will be using a number of components from NativeBase to see how they can help improve your workflow, as follows:
import React, { Component } from 'react';import { View, Text, StyleSheet } from 'react-native'import {  Spinner,  Button,  Body,  Title,  Container,  Header,  Fab,  Icon,} from 'native-base';
  1. Next, let's declare the App class and define a starting state object. We'll be adding a FAB section to show how NativeBase lets you easily add fly-out menu buttons to your app. We will track whether this menu should be displayed or not with the fabActive Boolean. We'll also use the loading Boolean ...

Get React Native Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.