Hi - given a login use case, where a user has to login by providing username, password and a region. The region is picked from a dropdown which is populated with values by an async api call. So I have those composables
• LoginForm
◦ RegionPicker
◦ UserNameInput
◦ PasswordInput
◦ LoginButton
What is best practice: having a viewmodel on LoginForm handling both the api request for regions and login (loading the regions as a
LaunchedEffect
on the LoginForm? Or having a viewmodel on the LoginForm for login and a separate viewmodel on the RegionPicker (with a
LaunchedEffect
in this sub-component)?