使用react-native-router-flux

我正在尝试将信息从上一页获取到当前页面。

我找到了这个解决方案,但是它不起作用。使用prevScene的属性actions,但它返回相同的字符串currentScente。为什么?

此外,我看到这个亲戚question,但没有人回答。

orcking080 回答:使用react-native-router-flux

我有同样的问题,但找不到合适的道具。

所以我在导航到currentScene时传递了from道具,并将其用于进一步处理,如下所示:

Actions.currentSceneKey({ from: 'prevSceneKey' });

console.log(this.props.from); // prevSceneKey
本文链接:https://www.f2er.com/2850477.html

大家都在问