Rx.Observable.just is not a function in JSBIN & RxJS 5

Philippe sillon picture Philippe sillon · Aug 26, 2016 · Viewed 7.4k times · Source

In JsBin, I got error "Rx.Observable.just is not a function" in Firefox & Chrome. JsBin example : http://jsbin.com/vunuta/edit?html,js,console

HTML :

script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.umd.js">

Typescript :

Rx.Observable.from ([1,2,3]).subscribe(x => console.log(x)); // Work
Rx.Observable.just (99).subscribe(x => console.log(x)); // Fail
Rx.Observable.return (99).subscribe(x => console.log(x)); // Fail

Tx

Answer

Harshal Patil picture Harshal Patil · Sep 10, 2016

Rx.Observable.just() is no longer provided in v5. Use Rx.Observable.of(). https://github.com/ReactiveX/rxjs/blob/master/MIGRATION.md