r/learnjavascript • • Oct 23 '17

JavaScript's Promise Leaks Memory

https://alexn.org/blog/2017/10/11/javascript-promise-leaks-memory.html
34 Upvotes

14 comments sorted by

View all comments

1

u/[deleted] Oct 23 '17

Is using Observable (since they're cancelable) any better ?

2

u/[deleted] Oct 23 '17

[removed] — view removed comment

1

u/[deleted] Oct 23 '17 edited Oct 23 '17

Observable is primarily a pattern. But if you want to you use it you need to use Rx which as implementations in many languages ( Js but also java, python etc..).

Edit here is a presentation by Ben Lesh about it explaining difference s between Observables and promises.

0

u/DanielFGray Oct 24 '17

if you want to use [observables] you need to use Rx

That's not true at all. There's an official proposal for them (currently stage 1 I believe), there's also probably a half dozen other implementations: kefir, bacon, and most, off the top of my head.

1

u/[deleted] Oct 24 '17

So stage 1 is a proposal so I need to use a library. And, correct me if I'm wrong but any of the other library you listed may work but none have the same community adoption that Rx has.