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

Complex examples

  • The Flocks Rocks website (git) shows a publishing system built in git, which pulls markdown from disk, converts it to static HTML, uses React to render isomorphic static content to disk, compiles LESS, uglifies, browserifies, and pushes that into Amazon S3, to be served from Amazon Cloudfront CDN. And then one may write markdown, commit, and gulp publish. 😸
Fork me on GitHub