
Notice that the splash screen and the app icon are defaults that come with React Native. Here is what the example app looks like in its current form. With the boilerplate setup done, now let’s build the apps for iOS and Android.įor iOS, run the following command: npx react-native run-iosįor Android, run the following command: npx react-native run-android Add the following code to use the stack navigation pattern inside this file: import * as React from 'react' Inside src/ directory, create a new directory called navigation/ with a new file named RootNavigator.js. Yarn add react-native-safe-area-context react-native-screens To create a new React Native project and install the react-navigation dependencies, run the following command from the terminal window: npx react-native init myAwesomeApp Note, the example app is created using React Native version 0.65.x.Ĭomplete source code for this example is at this GitHub repo Setup a React Native appĪs an example for this tutorial, we will use a React Native project with two screens and React Navigation integrated.

Every mobile application has a splash screen and an app icon, and together they provide the first impression.
