Redux Native 如何使用 react-navigation-redux-helpers 进行导航



我想知道如何在 React Native 中触发导航操作(使用 react-navigation-redux-helpers(?

我厌倦了使用NavigationActions.navigate({ routeName: 'App' }(功能,但没有:(

react-navigation为您提供动作创建者,请参阅 https://reactnavigation.org/docs/en/navigation-actions.html

import { NavigationActions } from 'react-navigation';
const navigateAction = NavigationActions.navigate({
routeName: 'Profile',
params: {},
action: NavigationActions.navigate({ routeName: 'SubProfileRoute' }),
});
this.props.navigation.dispatch(navigateAction);

尝试:

this.props.navigation.navigate('ScreenName')

相关内容

  • 没有找到相关文章

最新更新