The App object is the bread and butter of a Plait application. Even so, its API is tiny.
forwardDispatch(action, dispatch, state)
Starts a Plait application life cycle from a root component.
A component object which has all of the following properties:
(DOMNode): The root node of the application. This can be inserted into the document to render an application on the page.
Renders a Plait application node to a DOM node.
A Plait application node returned from
The DOM node which the application node should be rendered to.
(DOMNode): The root DOM node.
Initializes a component. Used to create child components from within a parent component.
A component object which has at least the following properties:
A dispatcher function. This is only required when the return value of
component.init() is of type
[initialState, initialAction]. In this case, the
initialAction action is dispatched using the
(State): A State object which contains the initial state of
Wraps a dispatcher so that any dispatched actions are instead forwarded to the given action. The given action will be annotated with the
$fwdAction property, containing the originally dispatched action.
This function is generally used to create a dispatch function which will be passed to the
view function of child components. It allows the parent component to forward the child component's actions to its own
The action which will be dispatched when the forwarded dispatch function is called.
The dispatcher function to be forwarded.
The state given to any asynchronous actions. This is usually the state of a child component.
(Function): A dispatcher function which will forward any incoming actions to the provided