-
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
Problem about pop and refresh #2860
Comments
This works sometimes, maybe once or twice, then componentWillReceiveProps is no longer triggered after making changes in SceneB is detail edit view
However, calling refresh in SceneB componentWillUnmount and adding an onExit to my scene that called REFRESH on itself made it reliable. No clue why or if this is a good idea. It just seems to work. It feels like a "house of cards" ...
|
Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists |
Version
Tell us which versions you are using:
Expected behaviour
I have the situation like that. I'm in scene A and push to scene B. I want to change something in scene B and pop to scene A and scene A should be update some data (not all). I used:
Actions.pop({ refresh: { coordinates: coordinate } });
+It works well with instances where the data entered is different, but nothing changes when the same input data.
Actual behaviour
When app pass data from scene A to scene B with same data in two time, only firsttime, scene A receive data.
componentWillReceiveProps(){
console.warn('1');
}
I debug in function componentWillReceiveProps, only first time it works, in other times, componentWillReceiveProps is not call.
When i research source code, I found this function:
@action setState = async (newState) => {...}
in file react-native-router-flux/src/navigationStore.js
react-native-router-flux/dist/navigationStore
, it check status of data and prevent data receiver.
How can i fix this.
Thank you!
The text was updated successfully, but these errors were encountered: