You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I appreciate Voyager’s pragmatic interface and flexibility, I’ve encountered an issue: when navigating to a new screen, the old screen gets disposed. Is there an option to instruct Voyager to retain the old screen without destroying it? My concern arises because I’ve integrated a WebView, and disposing and recomposing screens could lead to performance degradation and state loss. Thank you.
The text was updated successfully, but these errors were encountered:
I guess, If you want to retain something on your screen which is in the background, use screenModel.
This is compose thing: when a screen is removed from screen, it should be disposed.
@Hightower87, thanks for the suggestion.
Basically I want to put a WebView into the navigation framework. And it is really expensive to recompose a WebView even though its states can somehow be saved by some unofficial approaches.
I was after the same behaviour because recomposing my main view was expensive. My work around was to do the following. I'm not sure if this is a good or best approach and would welcome feedback.
var navigator: Navigator? = null
AppTheme() {
MainScreen(onNavigate = { navigator?.push(it) })
Navigator(EmptyScreen) { nav ->
navigator = nav
SlideTransition(nav)
}
}
While I appreciate Voyager’s pragmatic interface and flexibility, I’ve encountered an issue: when navigating to a new screen, the old screen gets disposed. Is there an option to instruct Voyager to retain the old screen without destroying it? My concern arises because I’ve integrated a WebView, and disposing and recomposing screens could lead to performance degradation and state loss. Thank you.
The text was updated successfully, but these errors were encountered: