import { NavigationAction , NavigationState } from "react-navigation" ; import AppNavigation from "../../Navigation/AppNavigation" ; export type NavigationState = NavigationState ; export const NavigationReducer = ( state , action ) => { const newState = AppNavigation . router . getStateForAction ( action , state ) ; return newState || state ; } ;