Rxdart: What happened to the forkJoin operator?

Created on 12 Jul 2018  路  4Comments  路  Source: ReactiveX/rxdart

Hi,

I see there was a commit quite some time ago adding the forkJoin operator (https://github.com/ReactiveX/rxdart/commit/38eb65577215724bc8429f69c11df1905e9553cc) but now I can't find it. Is there any plans to add this back in or is there a new preferred way to combine multiple streams and wait for the last emitted event?

Thanks,

Jon

Most helpful comment

I'd say listing forkJoin in the README.md with a comment how to do it in Dart should be enough in this case.

All 4 comments

Hey there -- interesting, hadn't seen that myself! Must have been when we were still relying on RxJS instead of implementing all operators in pure Dart.

You could still do this, however, with the functionality Streams + Futures Provide out of the Box:

final Future<List<String>> values = Future.wait<String>([streamA.last, streamB.last, streamC.last]);

We could also provide a ForkJoin operator, but not sure it'd save much code over doing it this way...

@brianegan thanks for this.

The only reason I can see to add it would be to help people who are unfamiliar with DartRx but have experience with other Rx implementations.

I'd say listing forkJoin in the README.md with a comment how to do it in Dart should be enough in this case.

Was this page helpful?
0 / 5 - 0 ratings