Skip to content

Instantly share code, notes, and snippets.

@streetsmartdev
Last active September 3, 2017 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save streetsmartdev/d0c05843fab25fd0036374833536f1c6 to your computer and use it in GitHub Desktop.
Save streetsmartdev/d0c05843fab25fd0036374833536f1c6 to your computer and use it in GitHub Desktop.
...
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