Examples of Flocks.js
use 
It is often said that a library marches on its examples. By nobody. Ever.
Simple examples
A spinner control, showing the sharing of a single piece of data across several controls, using the
Flocks mixin
, how to display it, and how to mutate it simply with two buttons.A simple Conway's Life implementation, showing how to work with basic state centralization, how to attach click handlers to inappropriate things (table cells,) and how to use lots of the color blue.
A working Markdown Editor with Live Preview which shows how to work with textareas, a foreign markdown library loaded from CDN, and simple regular expressions.
A simple tip calculator which shows how to work with text inputs, buttons, and basic CSS. Also, presented being built piece by piece as part of the Flocks Quick Start tutorial.
A quick implementation of automatic load and save with localStorage which shows how to wire localStorage up to be stored to on every state change, with no need to voluntarily save, and how to load initially with consulting that storage in mind.
A bar graph control which accepts a range of configuration parameters, allows you to specify color ranges, and scales itself to fit its space.
Intermediate examples
A day / hour heatmap meant to closely imitate the related and inspiring d3 example in rather less code.
An animated, live-editable animated bar graph control.
Complex examples
- The Flocks Rocks website (git) shows
a publishing system built in
git
, which pullsmarkdown
from disk, converts it to staticHTML
, usesReact
to render isomorphic static content to disk, compilesLESS
,uglifies
,browserifies
, and pushes that intoAmazon S3
, to be served fromAmazon Cloudfront CDN
. And then one may write markdown, commit, andgulp publish
.

