-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
onEnter not being executed when using Actions.pop() manually #2147
Comments
Please check latest master branch. If it still exists, try to reproduce on this repo Example project.
… On 31 Jul 2017, at 12:28, Raj Suvariya ***@***.***> wrote:
Version
Tell us which versions you are using:
react-native-router-flux v4.0.0-beta.12
react-native v0.46.3
Expected behavior
When I press "Add" button I am calling Actions.pop() and Actions.refresh({data: this.state.mydata}). In this case, when the previous screen becomes visible onEnter callback should be executed.
Actual behavior
When I press "Add" button I am calling Actions.pop() and Actions.refresh({data: this.state.mydata}). In this case, when the previous screen becomes visible onEnter callback is not being executed. It is being executed when I press back or Android hardware back button from second component.
Steps to reproduce
Project with two component
Add onEnter and onExit callbacks with console.log() in first component's scene inside router.
Add a button to open the second component from first component. (call Actions.openSecondComp())
In the second component add a button "Add" and on the press of this button call
Actions.pop();
Actions.refresh({data: "Random String"});
Check console logs. onEnter is not being executed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#2147>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABQpcT9KIISMxjfxQBTlBQrMO2NwutzSks5sTaxqgaJpZM4OoMW7>.
|
After taking clone of master even onExit is not working when I open the new screen using Actions.secondComp(). I have added onEnter and onExit props in Expected Behavior and test status
You can verify the same in the gif below |
So only onExit doesn't work properly, right? |
Yes |
Please check latest master, it should be fixed |
Okay |
How did you test it? Are you sure that you are using latest master (not just Example from master) ? |
I am using your example project only and yes I took pull from master not Example project (see the image) You can find the project here https://github.com/rajsuvariya/react-native-router-flux |
Example uses beta.15 not latest master, that is why I asked you to change RNRF inside Example to latest one. |
I am sorry about that. But as I am new to open source I don't know how to use the source code directly. Can you please tell me how to do it? |
Ok, please check latest now, I've modified dependencies directly to latest master |
Yes, It's working perfectly. Thanks a lot. |
Version
Tell us which versions you are using:
Expected behavior
When I press "Add" button I am calling Actions.pop() and Actions.refresh({data: this.state.mydata}). In this case, when the previous screen becomes visible onEnter callback should be executed.
Actual behavior
When I press "Add" button I am calling Actions.pop() and Actions.refresh({data: this.state.mydata}). In this case, when the previous screen becomes visible onEnter callback is not being executed. It is being executed when I press back or Android hardware back button from second component.
Steps to reproduce
The text was updated successfully, but these errors were encountered: