electrolobzik
01/02/2024, 3:29 PMelectrolobzik
01/02/2024, 3:31 PMemit
from a coroutine context/suspend function. Which probably is not desired. On the other hand I can replace all outputs with lambda-parameters, which can look heavy with a lot of them.electrolobzik
01/02/2024, 3:32 PMOutput
parameter?Arkadii Ivanov
01/02/2024, 3:37 PMtryEmit
instead, which doesn't require a coroutine context.Arkadii Ivanov
01/02/2024, 3:38 PMoutput: (Output) -> Unit
, or separate callbacks per output kind.Arkadii Ivanov
01/02/2024, 3:38 PMelectrolobzik
01/02/2024, 3:38 PMelectrolobzik
01/02/2024, 3:39 PMConsumer
is used. I suppose it should make some sense.Arkadii Ivanov
01/02/2024, 3:39 PMFlow
to a component to allow it receiving events (inputs), or pass StateFlow
for states. You can pass a callback (or a number of callbacks) for outputs.Arkadii Ivanov
01/02/2024, 3:40 PMConsumer
type. A normal callback could be used instead.Arkadii Ivanov
01/02/2024, 3:40 PMelectrolobzik
01/02/2024, 3:41 PM