Skip to content

Answer the Question: Q: What's your opinion in the claims of RxJS having too cumbersome API? AFAIK eg. Bacon.js was borned from that frustration.

Bacon.js was created for a number of reasons, the first of which was due to the nature of the source of RxJS. At the time that RxJS was created, it was not open source back in 2010, and in fact wasn't open sourced until 2012. That was the first frustration because Juha, the author of Bacon.js, could not fully understand the code, nor was it well documented. We have since remedied that in a number of ways with our site which contains all implementations of Rx and their operators. In addition, we have added extensive documentation for RxJS as well on the RxJS Documentation Page

The second reason is that RxJS was not idiomatic JavaScript at the time of its inception, in fact it more looked like C# just transla

View retrywhen.js
Rx.Observable.create(o => {
o.onError(new Error("always fails"));
}).retryWhen(attempts -> {
return, 3), (n, i) => i).flatMap(i => {
console.log("delay retry by " + i + " second(s)");
return Rx.Observable.timer(i * 1000);
View sample.js
function noop() { }
var ThaliAclDb = require('./lib/thaliacldb');
var express = require('express');
var app = express();
var acl = new ThaliAclDb('acl', { db: require('memdown')});
.then(function () {
View rawclicks.js
var rawClicks = Rx.Observable.fromEvent(document.querySelector('#btn1'), 'click');
var result = rawClicks.buffer(rawClicks.debounce(500));
result.forEach(function(events) {
document.querySelector('#output').innerHTML = events.length + 'x clicks';
View eventaggregator.js
var Rx = require('rx');
function EventAggregator() {
this._subject = new Rx.Subject(); // Can be ReplaySubject too
EventAggregator.prototype.publish = function (type, data) {
this._subject.onNext( { type: type, data: data });
View users.html
<!DOCTYPE html>
<meta http-equiv='Content-type' content='text/html; charset=utf-8'>
<title>Basic Example with JSX</title>
<link rel="stylesheet" href="base.css" />
<h1>ReactJs + RxJs</h1>
<div id="container">
View leveldb-acl.js
var Rx = require('rx');
var _ = require('lodash');
function noop() { }
function makeArray(item) {
return Array.isArray(item) ? item : [item];
var LevelUpAdapter = {
View run-mocha.js
var Mocha = require('mocha'),
fs = require('fs'),
path = require('path');
// First, you need to instantiate a Mocha instance.
var mocha = new Mocha;
// Then, you need to use the method "addFile" on the mocha
// object for each file.
View pouchdb.js
* PouchDB backend
"use strict";
var async = require('async');
var _ = require('lodash');
* Creates a PouchDB Backend
View assign.js
Observable.prototype.assign = function (object, property) {
return this.subscribe(function (x) {
object[property] = value;
// Usage
Observable.range(1, 1000)
.assign(document.querySelector('#result'), 'textContent');
Something went wrong with that request. Please try again.