Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i integration React mobx and Rxjs? #138

Closed
Frank1e0927 opened this issue Jul 18, 2018 · 2 comments
Closed

how can i integration React mobx and Rxjs? #138

Frank1e0927 opened this issue Jul 18, 2018 · 2 comments

Comments

@Frank1e0927
Copy link

React Mobx Rxjs
I searched a lot on the Internet, but I couldn't seem to find any reasonable integration plan. I later discovered that mobx-util has fromStream and toStream. There was some light at the end of the tunnel, but soon I was lost again. Because I really don't know how to combine this.

How can i organize a reasonable store and corresponding RXJS code

It would be great if you could give me some help~

@pelotom
Copy link
Contributor

pelotom commented Aug 8, 2018

@Frank1e0927 try this:

import { toStream } from 'mobx-utils';
import * as rx from 'rxjs';

const rxObservable = rx.from(toStream(() => /* computation involving mobx observables */));

@mweststrate
Copy link
Member

@Frank1e0927 did that answer the question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants