Last active
August 6, 2020 13:11
-
-
Save markodayan/f2145a995362e647cf3f583d3a7a1c54 to your computer and use it in GitHub Desktop.
React Native Expo Project Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
import { createAppContainer, createSwitchNavigator } from 'react-navigation'; | |
import { createStackNavigator } from 'react-navigation-stack'; | |
import { createBottomTabNavigator } from 'react-navigation-tabs'; | |
// Screen | |
import IndexScreen from './src/screens/IndexScreen'; | |
const navigator = createStackNavigator( | |
{ | |
Index: IndexScreen, | |
}, | |
{ | |
initialRouteName: 'Index', | |
defaultNavigationOptions: { | |
title: 'Blogs', | |
}, | |
} | |
); | |
const App = createAppContainer(navigator); | |
export default () => { | |
return <App />; | |
}; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create React Native Expo Project | |
npx expo-cli init <project name> --npm | |
# Install React Navigation | |
npm install react-navigation | |
# Install Dependencies | |
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view | |
# Install React Navigation Stack | |
npm install react-navigation-stack @react-native-community/masked-view | |
# Install React Navigation Tabs | |
npm install react-navigation-tabs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment