Skip to content

Instantly share code, notes, and snippets.

@markodayan
Last active August 6, 2020 13:11
Show Gist options
  • Save markodayan/f2145a995362e647cf3f583d3a7a1c54 to your computer and use it in GitHub Desktop.
Save markodayan/f2145a995362e647cf3f583d3a7a1c54 to your computer and use it in GitHub Desktop.
React Native Expo Project Setup
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 />;
};
# 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