Support computed state
chandlerprall opened this issue · comments
Use case
- sharing computed state - the Current Episode in a playlist is computed from a list of episodes and a timestamp, and is a useful thing to compute once and share
- reacting to the proper state change - A media element emits the current playhead at least 4 times a second. Reacting to this in the listener can result in repeated expensive computations. Instead, a Current Episode derived/computed state could be listened to directly, limiting reactive computation only to times when the value has changed.
This will need to maintain a dependency tree between computed values to avoid creating infinite update loops.
#10 is PR for computed state