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

Context reference inside MainViewModel #89

Open
DerrickRocha opened this issue Aug 30, 2019 · 1 comment
Open

Context reference inside MainViewModel #89

DerrickRocha opened this issue Aug 30, 2019 · 1 comment

Comments

@DerrickRocha
Copy link

I noticed you guys have a reference to a Context inside the MainViewModel. I thought viewmodels were not supposed to reference a view, Lifecycle, or any class that may hold a reference to the activity context. Am I missing something here?

@paolovalerdi
Copy link
Contributor

They may be misusing viewmodels, in that case there's a AndroidViewModel if you need the app context.

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