Back in November, I wrote about reactive programming libraries for JavaScript. Today I’m going to write about some frameworks and libraries which sit on top of the reactive libraries and provide UI or application integration.
Using these libraries you can write an app in a declarative manner and not have to worry about state management. Not every type of application benefits from this. At the moment, I’m working on a game with reactive programming, which I think may work well. Whether or not it is always appropriate, it is a worthwhile concept to learn.
Cycle.js
http://cycle.js.org/
Cycle.js attempts to model your application as pure data flow using reactive programming. It isolates a main
function for your logic and provides sources (inputs from the external world) and sinks (outputs/writes to the external world). It uses provided drivers to handle the integration with things like the DOM, HTTP requests, Websockets, etc. You need to see examples to appreciate exactly how it works.
Motorcycle.js
https://github.com/motorcyclejs/core
Motorcycle.js is being created by the same guy (and the group of contributors) as Cycle.js, but as the name suggests, it is designed to be faster. Under the hood, it uses Most.js instead of RxJS and a more performant virtual DOM library. It uses the same concepts of sources, sinks, and drivers.
Yolk
https://github.com/garbles/yolk
Yolk is meant to be a minimal API on top of RxJS and virtual DOM. It treats everything as an observable; even the properties passed into its React-like UI components. If you are familiar with React and RxJS, then you will be right at home with Yolk. Yolk is what I am using for my game.
There are no comments available on this site. If you want to respond then you can write your own blog article and send me the link via twitter. If there is an issue with this article or the site in general, you can open an issue on Github