wenLiangcan February 2016

How to use RxJs in Firefox Addon development?

Follow the steps described in this document, I use the following command to install rxjs:

npm install @reactivex/rxjs --save

then I write the testing code below in my index.js file:

'use strict';
var Rx = require('@reactivex/rxjs');
Rx.Observable.from('test').subscribe(function (c) { return console.log(c); });

When I ran:

jpm run

I got these errors from the terminal:

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

Answers


Noitidart February 2016

I haven't used RxJS myself but I have been wanting to learn it.

Here are some addons out there that do use it:

I would love to see how you use it

Post Status

Asked in February 2016
Viewed 2,450 times
Voted 9
Answered 1 times

Search




Leave an answer