- Let's start by opening the App.js file in the root of the project and add the imports, as follows:
import React from 'react';import Modal from 'react-native-modalbox';import { Text, StyleSheet, View, TouchableOpacity} from 'react-native';
- Next, we will define and export the App component, as well as the initial state object, as follows. For this app, we'll only need an isOpen Boolean for keeping track of whether one of our modals should be opened or closed:
export default class App extends Component { state = { isOpen: false }; // Defined on following steps}
- Let's skip ahead to building out the render method next. The template is made up of two TouchableOpacity button components that when pressed, open their respective ...