我正在使用以下代码进行导航
import { NavigationActions } from 'react-navigation';
let _navigator;
const setTopLevelNavigator = (navigatorRef) => {
_navigator = navigatorRef;
}
const navigate = (routeName, params) => {
_navigator.dispatch(
NavigationActions.navigate({
routeName,
params
})
);
}
export default {
navigate,
setTopLevelNavigator,
};
之后,我只是在做
NavigationService.navigate('<ScreenName>');
问题-转到下一个屏幕,但不返回上一个屏幕