I follow the book ReactNativeNotesForProfessionals.pdf and create a simple React Native application:
'use strict';import React, {Component} from 'react';import ReactNative from 'react-native';const { StyleSheet, Text, View, Navigator, Alert, TouchableHighlight } = ReactNative;class AppContainer extends Component { renderScene(route, navigator) { switch(route.name) { case "Home": return <Home route={route} navigator={navigator} {...route.passProps} /> default: return (<Text route={route} style={styles.container}> Your route name is probably incorrect {JSON.stringify(route)}</Text> ); } } render() { return (<Navigator navigationBar={<Navigator.NavigationBar style={ styles.navbar } routeMapper={ NavigationBarRouteMapper } /> } initialRoute={{ name: 'Home' }} renderScene={ this.renderScene } /> ); }}
When I run the app in debug mode for android device, I get the error message as the title of this post.I use the following version of React Native:
vhmau@ubuntu:~/Projects/Book$ react-native -vreact-native-cli: 2.0.1react-native: 0.62.0
Please help.