reactive-react
Version:
RR - Reactive React. A super tiny but purely reactive implementation of Flux architecture.
23 lines (22 loc) • 612 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Rx = require("rx");
var RR = require("../RR");
var action = RR.Observable.createAction({
a$: function () {
return null;
},
b$: function () {
return null;
},
});
action.a$.subscribe(function (item) { return item.length; });
var action2 = RR.Observable.createAction(['a$', 'b$'], function (a$, b$) {
return {
a$: new Rx.Subject(),
b$: new Rx.Subject(),
};
});
action2.b$.subscribe(function (p) { return p.x; });
var bindFunc = RR.Observable.bind('hello$', null);
bindFunc({});