# Quick Start Guide To get started with React Navigation, all you have to do is install the `react-navigation` npm package. ### Install with NPM ``` npm install --save react-navigation ``` ### Install with Yarn ``` yarn add react-navigation ``` To start using React Navigation you'll have to create a navigator. React Navigation comes with three default navigators. - `StackNavigator` - Provides a way for your app to transition between screens where each new screen is placed on top of a stack. - `TabNavigator` - Used to set up a screen with several tabs. - `DrawerNavigator` - Used to set up a screen with drawer navigation. ## Creating a StackNavigator StackNavigator's are the most common form of navigator so we'll use it as a basic demonstration. To get started, create a `StackNavigator`. ```javascript import { StackNavigator } from 'react-navigation'; const RootNavigator = StackNavigator({ }); export default RootNavigator; ``` We can then add screens to this `StackNavigator`. Each key represents a screen. ```javascript import React from 'react'; import { View, Text } from 'react-native'; import { StackNavigator } from 'react-navigation'; const HomeScreen = () => ( Home Screen ); const DetailsScreen = () => ( Details Screen ); const RootNavigator = StackNavigator({ Home: { screen: HomeScreen, }, Details: { screen: DetailsScreen, }, }); export default RootNavigator; ``` Now let's add a title to the navigation bar. ```javascript ... const RootNavigator = StackNavigator({ Home: { screen: HomeScreen, navigationOptions: { headerTitle: 'Home', }, }, Details: { screen: DetailsScreen, navigationOptions: { headerTitle: 'Details', }, }, }); export default RootNavigator; ``` Finally, we should be able to navigate from the home screen to the details screen. When you register a component with a navigator that component will then have a `navigation` prop added to it. This `navigation` prop drives how we use move between different screens. To move from the home screen to the details screen we'll want to use `navigation.navigate`, like so: ```javascript ... import { View, Text, Button } from 'react-native'; const HomeScreen = ({ navigation }) => ( Home Screen