The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Creation operators: from, fromArray, fromPromise

Creation operators: from, fromArray, fromPromise

3:41
The of() operator essentially converted a list of arguments to an Observable. Since arrays are often how we structure list of things in JavaScript, we should have a way of transforming arrays into Observables. This lesson teaches how you can convert from Arrays to Observables, from Promises to Observables, and from Iterators to Observables.
Watch this lesson now
Avatar
egghead.io

The of() operator essentially converted a list of arguments to an Observable. Since arrays are often how we structure list of things in JavaScript, we should have a way of transforming arrays into Observables. This lesson teaches how you can convert from Arrays to Observables, from Promises to Observables, and from Iterators to Observables.

Avatar
Steve Cordrey

It looks like fromArray() has been deprecated.

Avatar
Andre

Hi Steve, that is correct. The API fromArray() is not directly available, but one can still use from() which auto-detects what kind is the argument (array, Promise, etc) and under the hood may use fromArray or fromPromise, etc.

In reply to Steve Cordrey
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?