Settings

Theme

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

netflix.github.io

2 points by jdavid 10 years ago · 3 comments

Reader

WorldMaker 10 years ago

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().

fredkelly 10 years ago

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-...

jhusain 10 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection