diff --git a/packages/react-navigation/docs/guides/Guide-Intro.md b/packages/react-navigation/docs/guides/Guide-Intro.md index 103cff93..71756f29 100644 --- a/packages/react-navigation/docs/guides/Guide-Intro.md +++ b/packages/react-navigation/docs/guides/Guide-Intro.md @@ -32,7 +32,7 @@ Now lets create the new file for our app implementation, `App.js`. ## Introducing Stack Navigator -For our app, we want to use the `StackNavigator` because we want a conceptual 'stack' navigation, where each new screen is put on the top of the stack, and going back removes a screen from the top of the stack. Lets start with just one screen: +For our app, we want to use the `StackNavigator` because we want a conceptual 'stack' navigation, where each new screen is put on the top of the stack and going back removes a screen from the top of the stack. Let's start with just one screen: ```js import React from 'react'; @@ -68,7 +68,65 @@ first-screen ## Adding a New Screen -Lets create a button in the `HomeScreen` component that links to our second page: +In our `App.js` file, let's add a new screen called `ChatScreen`: + +```js +class ChatScreen extends React.Component { + static navigationOptions = { + title: 'Chat with Lucy', + }; + render() { + return ( + + Chat with Lucy + + ); + } +} +``` + +We can then add a button to our `HomeScreen` component that links to `ChatScreen` using the `routeName` `Chat`. + +```js +class HomeScreen extends React.Component { + static navigationOptions = { + title: 'Welcome', + }; + render() { + const { navigate } = this.props.navigation; + return ( + + Hello, Chat App! +