React Navigation v5-从sagas触发动作

问题描述 投票:0回答:1

我最近升级了我的代码以响应导航v5在React导航正常工作之前,从传说中如此顺利地调用NavigationActions没有任何问题。现在它触发一个动作,但是从不通过切换来切换到目标屏幕,而只是从View Component像使用onPress => navigation.navigate()

的按钮一样

enter image description here

也是负责触发传奇的代码

enter image description here

实施以下步骤后:https://reactnavigation.org/docs/navigating-without-navigation-prop/

我收到此错误

enter image description here

先谢谢您

react-native redux redux-saga react-navigation-v5
1个回答
0
投票

实际上我没有为此找到解决方案

但是我做了自己的解决方法,以防万一有人需要我将其张贴在这里

在主屏幕中,我做了以下操作

enter image description here

然后确定我将导航添加到了我的全局状态

在我的传奇中,我做了以下事情

enter image description here

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.