Navigation and expo update commit of modified
This commit is contained in:
parent
c606f6a701
commit
3947d1d6a6
11 changed files with 2947 additions and 2695 deletions
40
App.js
Executable file → Normal file
40
App.js
Executable file → Normal file
|
@ -1,7 +1,12 @@
|
|||
import React from 'react';
|
||||
|
||||
// Nav stuff
|
||||
|
||||
import { createAppContainer } from 'react-navigation';
|
||||
import { createStackNavigator } from 'react-navigation-stack';
|
||||
//import { createAppContainer } from 'react-navigation';
|
||||
//import { createStackNavigator } from 'react-navigation-stack';
|
||||
|
||||
import { NavigationContainer } from '@react-navigation/native';
|
||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||
|
||||
// Screens one per file to keep things clean
|
||||
|
||||
|
@ -13,16 +18,23 @@ import FilesScreen from './src/screens/FilesScreen';
|
|||
// Clean up of code before I fix the last little issue with it
|
||||
|
||||
|
||||
const AppNavigator = createStackNavigator(
|
||||
{
|
||||
Home: HomeScreen,
|
||||
About: AboutScreen,
|
||||
Files: FilesScreen,
|
||||
Settings: SettingsScreen,
|
||||
},
|
||||
{
|
||||
initialRouteName: 'Home',
|
||||
}
|
||||
);
|
||||
const Stack = createNativeStackNavigator();
|
||||
|
||||
export default createAppContainer(AppNavigator);
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<NavigationContainer>
|
||||
<Stack.Navigator initialRouteName="Home">
|
||||
<Stack.Screen name="Home" component={HomeScreen} />
|
||||
<Stack.Screen name="About" component={AboutScreen} />
|
||||
<Stack.Screen name="Files" component={FilesScreen} />
|
||||
<Stack.Screen name="Settings" component={SettingsScreen} />
|
||||
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
);
|
||||
}
|
||||
|
||||
//export default createAppContainer(AppNavigator);
|
||||
|
||||
export default App;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue