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.ViewModel
, ScreenModel
is just an interface. It's also Android independent and doesn't requires an Activity
or Fragment
to work.ScreenModel
instance inside a Screen
. Call rememberScreenModel
and provide a factory lambda.ScreenModel
for the same Screen
, add a tag to differentiate them.