bordoley / reactive-js

Fast modern reactive Javascript programming library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reconsider API signatures when input is a MulticastObservable.

bordoley opened this issue · comments

commented

Lots of operators, even the pure ones have wierd behavior when the input is a multicast observable.

Consider scan, even though the return type is multicast, the actual published values differ per subscriber, since internally the operator maintains state. Perhaps in this case we should always broadcast out the operator response using the multicast response. There are numerous other wierd examples in the Observable module api.

commented

these issues impact EventSource as well consider:

  • buffer
  • decodeWithCharset
  • pairwise
  • scan
  • skipFirst
  • takeFirst
  • takeWhile
  • toReadonlyArrayAsync

which are all stateful operators. Notably distinctUntilChanged/map/keep/merge* are all effectively stateless