question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

toStream is not rxjs compatible

See original GitHub issue

I noticed that the Symbol.observable, that should contain itself, is commented in the IObservableStream, which breaks compatibility with latest rxjs from function. https://github.com/mobxjs/mobx-utils/blob/master/src/observable-stream.ts#L22 Resulting in Argument of type 'IObservableStream<...>' is not assignable to parameter of type 'ObservableInput<...>'

If I understand this correctly, the Symbol.observable in the observable streams is accepted by the community as a standard of a sort. Is there a reason the line is commented?

Versions:

mobx-utils: 6.0.4
rxjs: 7.3.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
benleshcommented, Aug 30, 2021

Maybe toObservable, but otherwise, yeah.

It’s really early here so maybe I’m just tired, but looking at the code in question I’m not entirely sure what was wrong with it. It’s only supposed to handle observer, but it handles observer and function. It doesn’t seem to be broken?

0reactions
benjamingrcommented, Aug 30, 2021

@benlesh does the fix look good?

Read more comments on GitHub >

github_iconTop Results From Across the Web

toStream should produce an iterable, for better compatiblity ...
I only noticed I had to use RxJS 5 (npm package rxjs) when I looked at ... above Symbol.observable is not supported for...
Read more >
Using Angular 2/RxJs 5 beta observable to stream data from a ...
Is there a better solution or are observables not suited for what I want in general? javascript · angular · observable · rxjs....
Read more >
Frequently Asked Questions · Mobx Doc - iiunknown
Can MobX be combined with RxJS? Yes, you can use toStream and fromStream from mobx-utils to use RXJS and other TC 39 compatible...
Read more >
How to build GitHub search functionality in React with RxJS 6 ...
Here's what we're building: No classes, lifecycle hooks, or setState. ... And add this code to make Recompose compatible with RxJS 6:
Read more >
Installation Instructions - RxJS
When RxJS 7.4+ is used via a bundler targeting a browser (or other non-Node.js platform) ES module code targeting ES5 will be provided...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found