DEV Community

loading...

Discussion on: Observables are promises on steroids

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.

Forem Open with the Forem app