eventHandlerWithReturn

inline fun <E : Any, R> eventHandlerWithReturn(noinline onEvent: (E) -> R): EventHandler<E>


inline fun <E : Any, R> eventHandlerWithReturn(noinline onEvent: (E) -> R, componentContext: ComponentContext?): EventHandler<E>

Creates a result handler. A callback exception goes to componentContext's error handler and the dispatch returns null; without a context, the exception propagates to the caller.