| 102 | private scrollView = React.createRef<ScrollView>(); |
| 103 | |
| 104 | render() { |
| 105 | return ( |
| 106 | <ScrollView ref={this.scrollView} style={{ flex: 1 }}> |
| 107 | <FocusTag {...this.props} /> |
| 108 | <Button |
| 109 | title="Push" |
| 110 | onPress={() => { |
| 111 | this.props.navigation.push('PageTwo'); |
| 112 | }} |
| 113 | /> |
| 114 | <Button |
| 115 | title="Push and Pop Quickly" |
| 116 | onPress={() => { |
| 117 | const { push, goBack } = this.props.navigation; |
| 118 | push('PageTwo'); |
| 119 | setTimeout(() => { |
| 120 | goBack(null); |
| 121 | }, 150); |
| 122 | }} |
| 123 | /> |
| 124 | <Button |
| 125 | title="Back to Examples" |
| 126 | onPress={() => { |
| 127 | this.props.navigation.navigate('Index'); |
| 128 | }} |
| 129 | /> |
| 130 | </ScrollView> |
| 131 | ); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | const Stack = createStackNavigator( |