Pushing a new screen onto the stack is a common practice on mobile apps, however requires a slightly different mindset if you're from a web development
background. The basics of a stack allow you to `push` and `pop` where screens effectively overlay each other. The user cannot change stack item
unless you give them the ability to (compared to a website where the user could manually enter a different URL). This allows for greater
control over what a user is able to push/pop to.
Each component we assign to our `StackNavigator` gets cloned by `react-navigation` with a prop called `navigation` which gives us full control over
all of the navigation functionality we'll need.
- To "push" to a new screen we call the `navigate` method with the screen name we defined as the object key within `StackNavigator`.
- To "pop", or go back to the previous screen on the stack we call the `goBack` method.
Lets add a simple button to push to the `Register` screen we defined:
```jsx
// src/screens/unauthenticated/Login.js
import React, { Component } from 'react';
import { View, Button } from 'react-native';
class Login extends Component {
static navigationOptions = {
title: 'Login',
headerStyle: {
backgroundColor: '#E6853E',
},
headerTintColor: '#fff',
};
// Call this method on the button press
_register = () => {
this.props.navigation.navigate('Register');
};
render() {
return (
<View>
<Button
onPress={this._register}
title="Register Now!"
/>
</View>
);
}
}
export default Login;
```
Go ahead and click the button, you'll be pushed to a new screen. By pressing the back arrow on the header, `react-navigation` will automatically