One of my favorite tools in the Angular framework is the Async pipe. It allows me to render the latest value of an Observable to the screen. The co...
For further actions, you may consider blocking this person and/or reporting abuse
npmjs.com/package/reactivex-react
React is just not geared towards using Observables, it's totally centered around Promises.
Agreed, you can however, call the
.toPromise()
method on the final Observable.Why does the return function unsubscribe?
The useEffect hook can optionally return a 'clean-up' function which will be called once the input, in this case the 'ticker' observable changes or if the component unmounts. So, if our Observable where to change then we'd unsubscribe from the first one before subscribing to the new one.