com.raquo.airstream.split
package com.raquo.airstream.split
Type members
Classlikes
class SignalFromEventStream[A](val parent: EventStream[A], lazyInitialValue: => Try[A]) extends WritableSignal[A] with SingleParentObservable[A, A] with InternalTryObserver[A]
class SplitEventStream[M[_], Input, Output, Key](val parent: EventStream[M[Input]], key: Input => Key, project: (Key, Input, EventStream[Input]) => Output, splittable: Splittable[M]) extends WritableEventStream[M[Output]] with SingleParentObservable[M[Input], M[Output]] with InternalNextErrorObserver[M[Input]]
Broadly equivalent to parent.map(_.map(project))
, but the project
part
gets access to more data and is memoized by key.
Broadly equivalent to parent.map(_.map(project))
, but the project
part
gets access to more data and is memoized by key.
See docs.
- Value Params
- key
A sort of grouping / memoization key for inputs in
parent
- project
(key, initialInput, inputChangesForThisKey) => output - Will only be called ONCE for a given key as long as parent contains an Input for this Key - Updates to Input with this Key will be published in
inputChangesForThisKey
- After parent stops containing an Input for this Key, we forget we ever called project for this key