mobxjs/mobx-utils

how can i integration React mobx and Rxjs?

Closed this issue · 2 comments

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~

@Frank1e0927 try this:

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

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

@Frank1e0927 did that answer the question?