Dan Tech Academy
After this lesson you will
  • Declare ViewModels with viewModelOf or viewModel { } and know when you need the lambda
  • Use androidx.lifecycle.ViewModel in commonMain for Android and iOS
  • Explain ViewModelStoreOwner and the ViewModel lifecycle tied to the back stack entry
Duration25 min
DifficultyIntermediate

Koin ViewModel Scope

Koin ViewModel Scope in the Mobile Action Pro course.

What this lesson covers
  1. 01Lesson Goal
  2. 02Part 1: ViewModels In commonMain
  3. 03Part 2: viewModelOf
  4. 04Part 3: The viewModel Lambda When You Create A Parameter Yourself
  5. 05Part 4: Who Holds The Instance
  6. 06Part 5: Designing Around That Lifecycle
  7. 07Practice Exercise
  8. 08Code Reading Path
  9. 09Signs To Avoid
  10. 10References
  11. 11Key Points

Topics: kotlin, 07-dependency-injection

11 sections left in this lessonUnlock all of Mobile Action ProLesson Goal, Part 1: ViewModels In commonMain, … — plus 114 lessons in this course, source code and checklists.
Unlock Mobile Action ProOne-time payment — lifetime access — 7-day money-back. Already purchased? Sign in
Sign in