Add some logs to NavigationPlayground around helper dispatch return value This is a poor substitute for tests

This commit is contained in:
Brent Vatne
2018-06-06 21:12:18 -07:00
parent 518fc0df5c
commit 7d2f740c0f

View File

@@ -90,7 +90,16 @@ class MyNavScreen extends React.Component<MyNavScreenProps> {
/>
<Button onPress={() => popToTop()} title="Pop to top" />
<Button onPress={() => pop()} title="Pop" />
<Button onPress={() => navigation.goBack()} title="Go back" />
<Button
onPress={() => {
if (navigation.goBack()) {
console.log('goBack handled');
} else {
console.log('goBack unhandled');
}
}}
title="Go back"
/>
<Button onPress={() => dismiss()} title="Dismiss" />
<StatusBar barStyle="default" />
</SafeAreaView>