hey how are people handling one time events, like ...
# decompose
a
hey how are people handling one time events, like Toast/Snackbar events that the UI need to listen to and dispatch once?
I was thinking about consuming a Flow in compose using
collectAsStateWithLifecycle
but am not sure how that'll work on iOS
that didnt work well, but a
String?
on the state that uses a
LaunchedEffect
in compose works well
a
One of the options - expose some sort of CFlow (a Swift friendly wrapper class). Another option - have errors part of the state, and clear when handled in the UI.
a
okay ya the 2nd option is working for me for now