Skip to content
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

I am using MavericksViewModel on Compose, I want to get the LifecycleOwner object in ViewModel how do I need to get this? #706

Closed
artillerymans opened this issue Jan 4, 2024 · 3 comments

Comments

@artillerymans
Copy link

No description provided.

@gpeal
Copy link
Collaborator

gpeal commented Jan 4, 2024

What are you trying to do? A ViewModel has a different lifecycle from a Composable and, as a result, a ViewModel shouldn't know or care about any lifecycles other than its own.

@artillerymans
Copy link
Author

Because many third-party libraries use LifecycleOwner to manage the lifecycle.

@gpeal
Copy link
Collaborator

gpeal commented Jan 4, 2024

Right, but your ViewModel shouldn't be consuming or need to know about other lifecycles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants