Open alittletf opened 5 years ago
I have used redux provider with store and it works for me.
@ahanriat can you elaborate on what HOC means?
@alittletf I was able to accomplish this by doing this:
(...)
const mapDispatchToProps = (dispatch, ownProps) => {
return {
data: ownProps.data,
}
};
export default connect(mapStateToProps, mapDispatchToProps)(SCENE);
Hope this helps!
Version I am on:
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
`<Tabs key="TabBar" tabBarPosition="bottom" tabBarComponent={TabBarIOS}
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