android / android/architecture-samples

[dev-dagger] Singleton ViewModelFactory

Open
#704 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
45.8k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Description

Is it possible to make ViewModelFactory singleton? Right now, every time you inject it new instance will be created.

Contributor guide

Open the contributing guide

Research direction

Locate ViewModelFactory in the dev-dagger sample and inspect how it is injected and constructed. Confirm the desired behavior by checking that repeated injections reuse one instance, then identify the relevant verification point in the sample before making the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.