CLOVIS
03/28/2021, 9:04 AMgetUser(): Result<User>
, what is the idiomatic way of displaying that in the UI?
Before error handling was necessary, I had something like:
val (user, setUser) = remember { mutableStateOf<User?>(null) }
Button(onClick = { scope.launch { setUser(getUser()) } })
if (user != null)
// display the user
But now that there's a Result in the way, I'm unsure what would be the “compose way” of doing things.Dominaezzz
03/28/2021, 9:25 AM