StackNavigator Replace Action (#3440)

* Navigation replace action

The long awaited action to replace the a route in StackNavigator

* Fix flow maybe
This commit is contained in:
Eric Vicenti
2018-02-06 12:59:16 -08:00
committed by Brent Vatne
parent 7f50173cf1
commit 333b2e4b68
8 changed files with 138 additions and 31 deletions

View File

@@ -32,13 +32,8 @@ class MyNavScreen extends React.Component<MyNavScreenProps> {
title="Go to a photos screen"
/>
<Button
onPress={() =>
navigation.navigate('Profile', {
name: 'Dog',
headerBackImage: require('./assets/dog-back.png'),
})
}
title="Custom back button"
onPress={() => navigation.replace('Profile', { name: 'Lucy' })}
title="Replace with profile"
/>
<Button onPress={() => navigation.goBack(null)} title="Go back" />
<StatusBar barStyle="default" />