|
@@ -76,6 +76,10 @@ class PushedScreen extends Component {
|
76
|
76
|
<Text style={styles.button}>Dismiss all modals</Text>
|
77
|
77
|
</TouchableOpacity>
|
78
|
78
|
|
|
79
|
+ <TouchableOpacity onPress={ this.onPopToRootPress.bind(this) }>
|
|
80
|
+ <Text style={styles.button}>Pop to root</Text>
|
|
81
|
+ </TouchableOpacity>
|
|
82
|
+
|
79
|
83
|
<TextInput style={{height: 40, borderColor: 'gray', borderWidth: 1}}/>
|
80
|
84
|
|
81
|
85
|
<Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
|
|
@@ -140,6 +144,10 @@ class PushedScreen extends Component {
|
140
|
144
|
onDismissModal() {
|
141
|
145
|
this.props.navigator.dismissModal();
|
142
|
146
|
}
|
|
147
|
+
|
|
148
|
+ onPopToRootPress() {
|
|
149
|
+ this.props.navigator.popToRoot();
|
|
150
|
+ }
|
143
|
151
|
}
|
144
|
152
|
|
145
|
153
|
const styles = StyleSheet.create({
|