-
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
Question about Actions.refresh #2089
Comments
|
ok, Do you have an example? |
Yes, it is good question, it would be great to create separate issue for this - 'access to the component props from the navbar' I will think how to achieve that. |
@aksonov going to start an issue specifically based off this. |
Any progress on this issue? I found this answer helpful: 1516 |
I'm not sure if this was working the same on 3.x, but on 4 I noticed the following thing.
I have 3 scenes
A -> B -> C
Scene A is a list view.
Scene B shows a single Item
Scene C is an edit scene.
on Scene B I have this code:
Basically when the component is mounted we set a new title and we specify what should happen when you click the right button. This works fine. ComponentWillReceiveProps make sure that whenever our redux state is updated we update the Navbar header. That works.
However in Scene C I have this:
I'm again modifiy the tilte and right button. The problem is that in the edit Scene I do an update to the company. When I do this scene's B componentWillreceiveProps is updated with the new company. the handleNavBar function is called and we call Actions.refresh on scene B. But it doesn't refresh the navbar on Scene B, but on Scene C.
So my title changes to "Company name" and my right button changed to "edit" and not "save"... Obviously the action is also different.
Is this the expected behavior and is there any way around this other than using my own Navbar or just not updating the on componentWillReceiveProps?
The text was updated successfully, but these errors were encountered: