forkJoin is deprecated: resultSelector is deprecated, pipe to map instead forkJoin is deprecated: resultSelector is deprecated, pipe to map instead angular angular

forkJoin is deprecated: resultSelector is deprecated, pipe to map instead


I was able to fix this by getting rid of the ellipsis:

forkJoin(observables).subscribe();

As long as observables is already an array, it should have the same result.


forkJoin(observable1, observable2)       > WORKING - deprecation warningforkJoin([observable1, observable2])     > WORKING - no warning


forkJoin should work. Which rxjs version are you using? Latest version should be doing this:

import { of, combineLatest, forkJoin } from 'rxjs';import { map, mergeAll } from 'rxjs/operators';

Here the working code:

import { of, forkJoin } from 'rxjs';const observables = [of('hi'), of('im an'), of('observable')];const joint = forkJoin(observables);joint.subscribe(  s => console.log(s) )

Should output:

["hi", "im an", "observable"]

I tried reproducing this but I see no warning:

https://stackblitz.com/edit/angular-v4nq3h?file=src%2Fapp%2Fapp.component.ts