aksonov / aksonov/react-native-router-flux

Actions.key({ propNameExample: dataExample }) not passing data via props

未关闭
#3,435 3 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
8.9k
派生
2.1k
PR 合并指标
30 天内没有已合并 PR

描述

Version I am on:
- react-native-router-flux v4.0.6
- react v16.6.3
- react-native v0.58.5
- redux - 4.0.1
- react-redux - 6.0.1

### Expected behaviour

passing data as props through 'Actions.MyScene({ data: myData })' comes through to my other page and accessible via this.props.data;

### Actual behaviour

data comes back as undefined.

Router.js code

`








`

When im on my MainFeed component, I am calling the below. I successfully navigate to that screen but no props pass through.

`Actions.Passes({ data: data });`

I do not get any errors. All i get is in my QRCodes file is `this.props.data` is undefined.

### Steps to reproduce

Not sure what to put here as all ive done was update my packages above

Any help would be greatly appreciated.

EDIT:
It appears that passing data between scenes in the same stack works but passing data to scenes not in the same stack doesnt work. I tried to send the data the parent scene which i thought would then pass the data to the `initial` scene but that is where things are broken

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。