public class EventsBuilder<Change>
A configuration builder for Events related declarations.
| Modifier and Type | Method and Description |
|---|---|
void |
coldSource(kotlin.jvm.functions.Function0<? extends io.reactivex.Observable<Change>> source)
A function used for turning an external observable Event into a Change. In contrast
to
source function, coldSource function gets |
void |
source(kotlin.jvm.functions.Function0<? extends io.reactivex.Observable<Change>> source)
A function used for turning an external observable Event into a Change.
|
public void source(kotlin.jvm.functions.Function0<? extends io.reactivex.Observable<Change>> source)
A function used for turning an external observable Event into a Change.
Example:
events {
source {
userLocationObserver
.map { Change.UserLocationUpdated(it) }
}
}
public void coldSource(kotlin.jvm.functions.Function0<? extends io.reactivex.Observable<Change>> source)
A function used for turning an external observable Event into a Change. In contrast
to source function, coldSource function gets
subscribed when the first observer to Store.getState is subscribed
unsubscribed when the last observer of Store.getState is unsubscribed
Example:
events {
coldSource {
userLocationObserver
.map { Change.UserLocationUpdated(it) }
}
}
Store.getState,
Store.getState