Skip to content

Netflix: Falcor.js a JavaScript library for efficient data fetching

netflix.github.io
2 pointsjdavid3 comments
On HN

Comments

This seems interesting. Given Netflix's admitted love of RX [Reactive Extensions] I'm somewhat curious if there is a design reason that this uses Promises instead of (RxJS/Bacon/...) Observables. At first skim this seems like it could be even more useful as an Observable model.

I'm also curious if there is a design reason they aren't using ES5 defineProperty/ES6 property syntax over get()/set().

This looks a lot like Facebook's Relay/GraphQL [1], interested to hear how the two compare?

[1] http://facebook.github.io/react/blog/2015/02/20/introducing-...

As a matter of fact, falcor returns a Model response which inherits from observable and adds a then() method to it. That means that you can also call subscribe. If you call subscribe, you can cancel the request using the subscription return from the subscribe method. If you call then, it returns a Promise.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.