View getStateForAction.js
const defaultGetStateForAction = AppNavigator.router.getStateForAction; | |
AppNavigator.router.getStateForAction = (action, state) => { | |
const screen = state ? state.routes[state.index] : null; | |
const tab = screen && screen.routes ? screen.routes[screen.index] : null; | |
const tabScreen = tab && tab.routes ? tab.routes[tab.index] : null; | |
if ( | |
action.type === NavigationActions.BACK && | |
tab && tab.routeName === 'EventsTab' && |