The base API is mixed into the Component prototype.
A Component is just a constructor with properties mixed into its prototype. It comes with a set of basic functionality such as event handling and Component registration.
Each Component definition mixes in a set of custom properties which describe its behavior.
When a Component is attached to a DOM node, a new instance of that Component is
created. Each Component instance references the DOM node via its node
property.
A Component instance cannot be referenced directly; it communicates with other components via events.
flight.component
accepts any number of mixin functions and
returns a new Component constructor with those mixins applied to its prototype.
Each Component definition should include a function declaration describing its
basic behavior (we can think of this function as the Component's core mixin).
By passing this function to defineComponent
we can define a simple
Component: