pub fn CollectEvents<T, K>(
stream: EventStream<T>,
key: K,
on_event: impl FnMut(T) + 'static,
)where
T: 'static,
K: PartialEq + 'static,Expand description
Collects stream for as long as this call stays in the composition,
handing each event to on_event.
key re-starts the collection when it changes, exactly like
LaunchedEffect.