Here's a simple reactive Web app implementing a counter using Fairmont's Reactive programming functions.
var $ = require"jquery"F = require"fairmont";$var data = counter: 0 ;FstartFflowFevents"click" $"a[href='#increment']"Fmap datacounter++;;FstartFflowFevents"change" FobservedataFmap$"p.counter"htmldatacounter;;;
require "fairmont-reactive"$ = require "jquery"$ ->data = counter: 0start flowevents "click"$"a[href='#increment']"map -> datacounter++start flowevents "change"observe datamap ->$"p.counter"html datacounter
Check out our other reactive examples:
You can simply install Fairmont as a whole:
npm install fairmont
Or you can simply install the components you need.
npm install fairmont-core
Learn more about the individual Fairmont components by clicking on the links below:
The API Reference provides documentation on each component and its corresponding functions.
Fairmont is still under heavy development and is
beta quality, meaning you should probably not use it in your production code.
You can get an idea of what we're planning by looking at the tickets. If you want something that isn't there, and you think it would be a good addition, please open a ticket.