Skip to content

Injecting Navigator into ScreenModel #222

Closed Answered by Syer10
KoTius asked this question in Q&A
Discussion options

You must be logged in to vote

You shouldn't do that, if the user puts the app in the background for a while, Jetpack Compose removes the UI so the Navigator won't survive, but the ScreenModel will. Doing this will make you always have a reference to the old navigator, and on restore will make it not work because its not the same navigator instance.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by KoTius
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants