WebRX
Dynamic JavaScript User-Interfaces with ReactiveX
WebRx is a Javascript MVVM-Framework built on ReactiveX for Javascript (RxJs) that combines functional-reactive programming with observable-powered declarative Data-Binding, Templating and client-side Routing.
Examples Documentation Source FollowDeclarative Bindings
Automatic UI Refresh
Templating
Client-Side Routing
Features
- Tested with IE9+, Firefox 5+, Chrome 5+, Safari 5+, Android Browser 4.0+, iOS Safari 5.0+
- Comprehensive online documentation
- Extensible data-binding with many built-in operators
- Supports Modules to facilitate code-reuse and separation of concerns
- Integrates Components modelled after the upcoming Web-Components standard for organizing UI code into self-contained, reusable chunks
- State-based routing engine inspired by Angular's UI-Router
- No dependencies besides RxJS-Lite
- Compact (~25Kb minified & compressed)
- First class TypeScript support
Installation
-
Installation via NuGet
PM> Install-Package WebRx
-
Installation via Bower
bower install WebRx
- or download
Make sure to include script-references to rx.lite.js and rx.lite.extras.js before web.rx.js when integrating WebRx into your projects.
Support
Stackoverflow is WebRx's primary support-hub.
Simply post your question under the webrx
tag and we'll do our best to help.
Live Example
Choose a ticket class:
You have chosen for $
HTML
Choose a ticket class:
<wx-select params="items: tickets, selectedValue: @chosenTicket, itemText: 'name'">
</wx-select>
<button data-bind="command: resetTicketCommand">Clear</button>
<p data-bind="with: chosenTicket">
You have chosen <b data-bind="text: name"></b>
for $<span data-bind="text: price"></span>
</p>
Javascript
function TicketsViewModel() {
var self = this;
this.tickets = [
{ name: "Economy", price: 199.95 },
{ name: "Business", price: 449.22 },
{ name: "First Class", price: 1199.99 }];
this.chosenTicket = wx.property();
this.resetTicketCommand = wx.command(function() {
self.chosenTicket(null);
}, wx.whenAny(this.chosenTicket,
function(ticket) {
return ticket != null;
}));
}
wx.applyBindings(new TicketsViewModel());