This message was deleted.
# compose
s
This message was deleted.
z
If you want to call api at the time your Composable get composed so you can use LaunchedEffect for api call as it will execute at the time of composition only once.
p
I would separate the Error state in ErrorSeenByUser and ErrorNotSeenByUser. Then when user navigates our of that screen I would assume the user is aware of the error. Then would put the state in ErrorSeenByUser.
p
@Zaki Shaikh it is not what i am asking. FYI LaunchEffect re-run on naviagate back
d
How does the user "acknowledge" that they've seen the error? That action can also tell the VM to tweak your state either to get rid of the error or like PablichJenkov says to flag it as "seen"