Compose Tab without Hilt

So What?

In Multi Tab case, each tab will be able to have each own scope ViewModel.

What about not using AAC ViewModel and Hilt?

By other previous posting, We don’t use AAC ViewModel and Hilt.

Wrap up

Without Hilt and AAC ViewModel , We have to prepare how to provide ViewModel to each tabs structural. So we define a interface : ComposableHolder . It manages each tab’s DI injection and Composable function.


You may question how to ComposableHolder has component. Let me put some example of Dagger components



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SeongUg Steve Jung

SeongUg Steve Jung

Android Developer, Google Developers Experts