StephenGrider / rn-casts

Companion Repo for a React Native course on Udemy
https://www.udemy.com/the-complete-react-native-and-redux-course
865 stars 472 forks source link

error #8

Open jjpaul99 opened 4 years ago

jjpaul99 commented 4 years ago

This is my app.js code:

import { createAppContainer } from 'react-navigation'; import { createStackNavigator } from 'react-navigation-stack'; import HomeScreen from './src/screens/HomeScreen'; import ComponentsScreen from './src/screens/ComponentsScreen';

const navigator = createStackNavigator( { Home: HomeScreen, Component: ComponentsScreen }, { initialRouteName: 'Components', defaultNavigationOptions: { title: "App" } } );

export default createAppContainer(navigator);

This is my ComponentsScreen.js file:

import React from 'react'; import { Text, StyleSheet } from 'react-native';

const ComponentsScreen = () => { return This is the Components Screen; };

const styles = StyleSheet.create ({ textStyle: { fontSize: 30 } });

export default ComponentsScreen;

import React from 'react'; import { Text, StyleSheet } from 'react-native';

const ComponentsScreen = () => { return This is the Components Screen; };

const styles = StyleSheet.create ({ textStyle: { fontSize: 30 } });

export default ComponentsScreen; Screenshot_20200515_174827_host exp exponent Screenshot_20200515_174817_host exp exponent Screenshot_20200515_174832_host exp exponent Screenshot_20200515_174823_host exp exponent

sangampokharel commented 4 years ago

// replace Components with Component like this initialRoutName:'Component'

//in ComponentScreen replace return This is Component Screen with code below:

return <View> <Text> This is Component Screen</Text></View>