The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Completing a Stream with TakeWhile

Completing a Stream with TakeWhile

1:19
When you need to total up everything that has happened in your stream, you need to a way to tell your stream that it is “done”. This lesson covers how to use `takeWhile` to complete a stream.
Watch this lesson now
Avatar
egghead.io

When you need to total up everything that has happened in your stream, you need to a way to tell your stream that it is “done”. This lesson covers how to use takeWhile to complete a stream.

Avatar
G

Getting a rather strange error from the changes in this episode.

Uncaught TypeError: Rx.Observable.combineLatest(...).takeWhile is not a function

I'm using the RxJS 5.0.0-alpha.8 build on jsbin.com, but I can't find anything that would indicated an issue with takeWhile being used.

In reply to egghead.io
Avatar
G

Hmm, even downgrading to the stable rx.all 4.0.6 gives a new error

Uncaught TypeError: start$.mapTo is not a function

From the starters$ Observable

const starters$ = Rx.Observable.merge(
    start$.mapTo(1000),
    half$.mapTo(500),
    quarter$.mapTo(250)
);
In reply to G
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?