function getCurrentRouteName(navigationState) {
    if (!navigationState) {
        return null;
    }
    const route = navigationState.routes[navigationState.index];
    // dive into nested navigators
    if (route.routes) {
        return getCurrentRouteName(route);
    }
    return route.routeName;
}
export default () => <AppNavigator onNavigationStateChange={(prevState, currentState) => {
    const currentScreen = getCurrentRouteName(currentState);
    const prevScreen = getCurrentRouteName(prevState);
    if(currentScreen==='Home'){//监听页面跳转 符合要求可以发送监听
        DeviceEventEmitter.emit('HomeData', 'HomeData');
    }
    // console.log('currentState',currentState);
    // console.log('prevState',prevState);
    // console.log('currentScreen',currentScreen);
    // console.log('prevScreen',prevScreen);
}}/>;