Exercise - Multicast Operator
Exercise
The goal of this exercise is to learn how to create a multicasted Observable.
- Open exercise on codesandbox.
I've already imported the necessary rxjs functions and classes for you.
I also created a new
observable
using theinterval()
function that will emit a value every 1000 milliseconds. - Define a new
Subject()
. - Use the
multicast()
operator in thepipe()
of the sourceobservable
. - Subscribe to the multicasted observable and log out the next notification values.
- Connect the Subject to the source Observable.