Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error #8

Open
jjpaul99 opened this issue May 15, 2020 · 1 comment
Open

error #8

jjpaul99 opened this issue May 15, 2020 · 1 comment

Comments

@jjpaul99
Copy link

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
Copy link

sangampokharel commented May 16, 2020

// 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants