Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
...
import {NavigationActions} from "react-navigation";
class LoginScreen extends React.Component {
render() {
const reset = NavigationActions.reset({
index: 0,
actions: [NavigationActions.navigate({ routeName: "Internal" })]
});
return (
...
<Button
onPress={() => this.props.navigation.dispatch(reset)}
title="Login"
/>
...
);
}
}
LoginScreen.navigationOptions = {
title: "Login",
header: null //header is null to hide header
};
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment