Open leonyu opened 7 months ago
First question: yes, no restrictions -- what constraints would you have expected?
Second question: I think this is a mistaken impression of how Computed works. They're not push based; they don't emit updated values eagerly, they just have a single up to date value (cached already, or recomputed as necessary) when read. So it doesn't really make sense to think of them as streams you can filter.
(Internally though, they can notify less by using the equality function, but never more)
Is there type constraint for the state/value? Conceivably state could be
State<State<Foo>>
. That should probably be documented.This also begs the question whether
Computed
can perform filtering and higher-order functions (e.g. emit more times or less times than the source).