-
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
How to refresh Tabs scene every time i switch tabs? #2937
Comments
In stack definition:
In SomeView:
What is going on here is that when you navigate to a View, onEnter is fired. This even works if you are going back and forth between tabs. The refresh line refreshes the view setting enterTime to that time. If there is a delta between enterTime and the and the next enterTime, it will fire whatever is in that function or whatever you put there. This can be expensive if you are doing heavy lifting. You also have to change the state (setState) of something that is rendered to trigger it. (someone could correct me here, but I'm 90% sure you have to change state of something rendered) |
Thanks @asciifaceman for your help, but when i use this code i get warning "Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted component. This is a no-op." |
What are you doing specifically? |
You might be clicking too fast, I get that sometimes but usually works fine using the Actions.refresh method. |
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:
The text was updated successfully, but these errors were encountered: