Nicholas Jamieson
1 min readSep 7, 2018

--

The hot and cold helpers create hot and cold observables respectively.

With a cold test observable, each subscriber receives the notifications represented in the marble diagram, played from the diagram’s beginning.

hot test observables are different. With a hot test observable, a subscriber receives only the notifications represented in the marble diagram that are at or after the time of subscription.

You can see how the two types are used by looking at some of the tests in the RxJS repository.

Here is one that uses cold observables. And here is another that uses hot observables. Note that with the hot test observable, the subscriber does not receive notifications that occur before the time of subscription.

--

--

Nicholas Jamieson
Nicholas Jamieson

Written by Nicholas Jamieson

RxJS core team member; front-end developer; mentor; speaker; open-source contributor

No responses yet