The ScreenModel and rememberScreenModel are part of the core library.
ScreenModel is just like a ViewModel: designed to store and manage UI-related data in a lifecycle conscious way. It also allows data to survive configuration changes such as screen rotations.
Unlike ViewModel, ScreenModel is just an interface. It's also Android independent and doesn't requires an Activity or Fragment to work.
class HomeScreenModel : ScreenModel {
// Optional
override fun onDispose() {
// ...
ScreenModel is integrated with Coroutines, RxJava, LiveData, Koin, Kodein and Hit!
By design, it's only possible to create a ScreenModel instance inside a Screen. Call rememberScreenModel and provide a factory lambda.
class HomeScreen : Screen {
override fun Content() {
val screenModel = rememberScreenModel { HomeScreenModel() }
// ...
If you need to have multiple instances of the same ScreenModel for the same Screen, add a tag to differentiate them.
val screenModel = rememberScreenModel(tag = "CUSTOM_TAG") { HomeScreenModel() }


Source code here.