Observable `of` deprecated. What is the equivalent?
If you do have a scheduler, the equivalent for of(item, scheduler)
is scheduled([item], scheduler)
. If you're already passing in an array of items, you don't need the brackets.
Only the overloads that accept a scheduler are deprecated. The variant that you are using is not deprecated, see https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/of.ts
As said above, it is not deprecated.
I suppose you are migrating from RxJS v5 to RxJS v6. In that case:
The standard observable processing like of, map, filter, etc
Observable.of(1,2,3).map(x => 2 * x);
Becomes
import {of, map} from 'rxjs';
import {map} from 'rxjs/operators';
of(1,2,3).pipe(map(x => 2 * x));
Check more here https://www.learnrxjs.io/concepts/rxjs5-6.html