按照此document中所述的步骤操作,我使用以下命令安装rxjs
:
npm install @reactivex/rxjs --save
然后我在下面的index.js
文件中写下测试代码:
'use strict';
var Rx = require('@reactivex/rxjs');
Rx.Observable.from('test').subscribe(function (c) { return console.log(c); });
我跑的时候:
jpm run
我从终端收到了这些错误:
JPM [error] Message: TypeError: root_1.root.Symbol is undefined
Stack:
@resource://xxxx/node_modules/@reactivex/rxjs/dist/cjs/util/Symbol_observable.js:5:5
@resource://xxxx/node_modules/@reactivex/rxjs/dist/cjs/Observable.js:3:27
@resource://xxxx/node_modules/@reactivex/rxjs/dist/cjs/Rx.KitchenSink.js:1:20
@resource://xxxx/node_modules/@reactivex/rxjs/index.js:1:18
@resource://xxxx/index.js:2:10
run@resource://gre/modules/commonjs/sdk/addon/runner.js:147:19
startup/</<@resource://gre/modules/commonjs/sdk/addon/runner.js:87:9
Handler.prototype.process@resource://gre/modules/Promise-backend.js:934:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:813:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise-backend.js:747:1
答案 0 :(得分:0)
我自己没有使用RxJS,但我一直想学习它。
以下是一些使用它的插件:
我很想看看你如何使用它