Exercise - New Observable
Exercise
The goal of this exercise is to become familiar with creating a new Observable.
- Open the exercise on codesandbox.
- I've already imported the
Observableclass for you. - New up the
Observableclass. - Provide the
constructor()function with a callback function that will be invoked by RxJS with aSubsciberinstance. - Use the
next()method to emit a value to all Observers (subscribers) of the Observable. - Finally, use the
subscribe()method on the newObservableinstance to subscribe to the next notification. - Log out the value that is emitted.