Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to transfer a state value from one scene to another via “Actions.push()” ... #3196

Closed
keneseu opened this issue Aug 21, 2018 · 2 comments

Comments

@keneseu
Copy link

keneseu commented Aug 21, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.1
  • react-native v0.56.0

Expected behaviour

Able to transfer a "task" state value from "tasks" scene to the "screen" scene, using “Actions.push” - where "the router and scenes" are defined in "App".

Actual behaviour

The "Screen" scene seemed to receive an "undefined" value instead ...

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1.
2.
3.

Tasks.txt
Screen.txt
App.txt

@keneseu keneseu changed the title Unable to transfer a state value from one scene to another using “Actions.push()” ... Unable to transfer a state value from one scene to another via “Actions.push()” ... Aug 21, 2018
@daviscabral
Copy link
Collaborator

You should use the scene key or jump to make that work. You can see this working in the Tab 5 from the Example code.

With the example, the code would be:

  onPress = () => {
    Actions.screen({incomingTask: this.state.task})
  }

2018-08-23 05 17 54

In case that is still happening, please provide a failing example and reopen this ticket.

@keneseu
Copy link
Author

keneseu commented Aug 23, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants