React native - prevent user from going back to login screen
Using Navigator, you can use resetTo(startingRoute)
method to reset the stack and start a new one from the route you past as a parameter. Doing this you will prevent to navigate back in the stack.
If I'm not misunderstanding your component, you should use something like this:
goToCategoryView = () => {
//Replace here push with resetTo
this.props.navigator.resetTo({
title: 'Categories',
component: CategoryView,
})
}
Facebook Docs