I have a problem With this. I am very new to react-native. I am Building react native app. In there I have used React navigation.
This is my pakage.json file.
{
"name": "empty-project-template",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"eject": "expo eject",
"android": "expo start --android",
"ios": "expo start --ios"
},
"dependencies": {
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "^0.57.3",
"react-navigation": "^3.0.0-alpha.6"
}
}
This is my App.js file.
import React from 'react';
import Route from './src/routes';
export default class App extends React.Component {
render() {
return (
<Route/>
);
}
}
And There I have created a Home.js file.
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class Home extends React.Component {
render() {
return (
<View style={styles.container}>
Add friends here!
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
There I have created route.js file like this.
import { createStackNavigator } from 'react-navigation';
import HomeScreen from './components/Home';
const Route = createStackNavigator({
Home: { screen: HomeScreen }
});
export default Route;
After Creating These files.When I hit expo start --android It load nothing on the simulator. It just stuck on the loading screen. Can someone help me to solve this problem? Thank You!!!