API Overview
This is meant to be a quick overview to understand the general shape of Flocks
.
For a more detailed understanding, please see the Flocks
Docs.
Basics
flocks.createClass
- an analogue ofReact.createClass
which addsflocks.plumbing
to aReact
component spec automaticallyflocks.mount(config, state)
- accepts aconfig
and adata
set; mounts your root control; returns an updating function; triggers theFlocks
lifecyclehandler
- a validation gateway function which can refuse an updatefinalizer
- a function called after any update
flocks.plumbing
- A mixin which is added to controls to providefctx
andfset()
Setting values
this.fset(key, value)
- set akey
in theFlocks context
to avalue
.this.fset_path(path, value)
- set apath
to avalue
in theFlocks context
.
Getting values - the Flocks Context
this.fctx
- where yourFlocks
application's state is foundthis.get_path(path)
- get the value at apath
- occasionally useful as the dual of.set_path
Utilities
isArray(maybeArray)
- tests whether a value is anarray
isUndefined(maybeArray)
- tests whether a value is anarray
isNonArrayObject(maybeArray)
- tests whether a value is anobject
which is also not anarray
Next:Flocks Docs 

Prev:Flocks Examples 
