-
-
Notifications
You must be signed in to change notification settings - Fork 9
keep-alive is not supported? #26
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
Comments
No, keep-alive does not work with frames (thus navigator). What would be the expected behavior? Keeping previous routes alive? If so, just utilize the backstack, since that's what it's for. |
Lets say you have bottom navigation, each displaying a different route. Each route needs to fetch data from an api before it is displayed. Ideally this data fetch would only happen once, then each route can be kept alive so that navigating back and forth between your bottom tabs is fast. At the moment I'm using the BottomNavigation component, which does seem to keep all tabs alive. But it also seems to load all the routes upon initial render, which means all data is being fetched for each route when the app first loads and I think it's causing the initial render to take a little longer. |
@jadedigital it's probably a good idea to delegate the fetching to a central place (like vuex) where you can cache the retrieved data. Due to the infinite number of possibilities with view hierarchies - it's not feasible to support KeepAlive with Frames (and thus the Navigator) as they are managed by a native backstack that we don't have much control of. |
Uh oh!
There was an error while loading. Please reload this page.
I use below but nothing effect?
The text was updated successfully, but these errors were encountered: