RxJS Functions (Part 7)

Corey Pyle
2 min readJan 14, 2019

--

from

“Do not take me for some conjurer of cheap tricks!”

from

Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.

TL;DR

Creates an Observable in several different ways. If you want to make your own Observable, see if you can use from first before calling the Observable constructor.

Use Case

The StackBlitz above best illustrates the various uses of from. It creates three Observables:

It then concats all of those to produce the animation above.

Thanks for reading. Stay tuned for Part 8, and be sure to checkout my previous articles.

--

--