DEV Community

Discussion on: Observables are promises on steroids

andywer profile image
Andy Wermke

Yeah, maybe that's the best to get started. You should definitely start with RxJS's documentation – it's pretty good!

Which library you then use doesn't really matter too much as their APIs are very similar to almost identical.

Thread Thread
patarapolw profile image
Pacharapol Withayasakpunt Author

const terminateSubscription = () =>

Do you actually mean

new Observable((obs) => {
  return terminateSubscription
  // I actually use
  // return () => { isUnsubscribed = true }
Thread Thread
andywer profile image
Andy Wermke

Yes, my bad! I updated my code sample accordingly.