Update UsingNavigators.md

Summary:
Improve code formatting
Closes https://github.com/facebook/react-native/pull/11019

Differential Revision: D4220686

Pulled By: mkonicek

fbshipit-source-id: 019c02ee98e632b7f48567a22ca8cabeddadd584
This commit is contained in:
Patrik Toma 2016-11-22 10:11:58 -08:00 committed by Facebook Github Bot
parent 333cf3bc99
commit 45e97b0812
1 changed files with 5 additions and 3 deletions

View File

@ -117,8 +117,8 @@ class SimpleNavigationApp extends Component {
<MyScene
title={route.title}
// Function to call when a new scene should be displayed
onForward={ () => {
// Function to call when a new scene should be displayed
onForward={() => {
const nextIndex = route.index + 1;
navigator.push({
title: 'Scene ' + nextIndex,
@ -152,10 +152,12 @@ export default class MyScene extends Component {
render() {
return (
<View>
<Text>Current Scene: { this.props.title }</Text>
<Text>Current Scene: {this.props.title}</Text>
<TouchableHighlight onPress={this.props.onForward}>
<Text>Tap me to load the next scene</Text>
</TouchableHighlight>
<TouchableHighlight onPress={this.props.onBack}>
<Text>Tap me to go back</Text>
</TouchableHighlight>