Apollo-client: Move to RxJS-style observable instead of TC39

Created on 7 Sep 2016  路  9Comments  路  Source: apollographql/apollo-client

All 9 comments

Might be helpful apollo-client-rxjs

Is there a really minimal version of RxJS observables we can use?

I don't think so. It could be reduced with tree shaking but as far as I know there's no standalone package with only rxjs/Observable.

Maybe we can copy-paste it or something - I _really_ don't want to introduce a dependency on RxJS...

As you can see here we could create our own Observable and that's it. But the real problem is that operators are being added to Observable using prototypes. Take a look at map().

I think that providing another, standalone package that depends on rxjs and extends ApolloClient is more convenient.

Let's say TC39 accepts the same strategy for Observables as RxJS uses now, then ApolloClient could be easily switched into that.

I think we're actively being harmed by using the TC39 proposal since it's bad, so I'm looking for an intermediate solution.

I will think about a solution later, will ping you if anything comes to my mind

For now we'll have something observable-like in the core of Apollo Client without subscribing to either full spec.

Was this page helpful?
0 / 5 - 0 ratings