reactiveState

inline fun <E : ErrorEvents, T : ReactiveState<E>> Fragment.reactiveState(crossinline provider: BuildOnViewModelContext.() -> T): Lazy<T>
inline fun <E : ErrorEvents, T : ReactiveState<E>> ComponentActivity.reactiveState(crossinline provider: BuildOnViewModelContext.() -> T): Lazy<T>

Creates a multiplatform ReactiveState ViewModel and observes its ReactiveState.eventNotifier.

The provider should instantiate the object directly.