ViewModel shared among multiple screens #1191
Replies: 1 comment
-
Ooops, I spoke too fast. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My app would benefit from having a ViewModel that is shared amongst multiple screens. With fragments, I was using the following in each one of the fragment that required access to that shared ViewModel:
I looked at the NIA code, but did not see any instance of such sharing of the same ViewModel across multiple screens.
If there is, thanks for pointing it out to me.
If not, what would be a best practice in the Compose world?
I know of this video (https://www.youtube.com/watch?v=h61Wqy3qcKg&t=647s), should it be considered best practices for "Sharing Data Between Screens in Jetpack Compose"?
Beta Was this translation helpful? Give feedback.
All reactions