Get previously scene with react-native-router-flux

微笑、不失礼 提交于 2021-01-29 22:36:13

问题


I'm trying to get the information from the previous page to the current one.

I find this solution, but it doesn't work. Use the property prevScene of Actions but it return the same string of currentScente. Why?

Furthermore, I see this relative question, but no one has answered.


回答1:


I had the same question but I couldn't find the right prop for it.

So I've passed a from props while navigating to the currentScene and used it for further processing, like this:

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

console.log(this.props.from); // prevSceneKey


来源:https://stackoverflow.com/questions/59507083/get-previously-scene-with-react-native-router-flux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!