The first big change is the lack of the AppRegistry and the registerComponent call. Instead, we will use Navigation.setRoot(...) and it will do the job. The setRoot function should only be invoked if we are certain that the application was launched successfully, as shown here:
// src / Chapter 7 / Example 7 / src / screens / index.jsimport { Navigation } from 'react-native-navigation';// ...export default () => Navigation.events().registerAppLaunchedListener(() => { Navigation.setRoot({ // ... });});
Our root/entry file will then only invoke the React Native Navigation function:
import start from './src/screens/index';export default start();
Okay. The more interesting part is what we put into the setRoot ...