-
Notifications
You must be signed in to change notification settings - Fork 68
Component lifecycles
briancavalier edited this page Jun 17, 2011
·
3 revisions
Each component in a wire spec has a well-defined lifecycle that is managed by wire.js. When wire.js processes the spec to create a context, the components in the spec will go through the following lifecycle stages:
- Create
- Configure
- Initialize
- Ready
- Destroy
During the Create stage, a factory creates the component instance. Then, during each lifecycle stage (including Create), various facets will be applied to the instance.
When a context is destroyed by calling its destroy()
method, the components will go through a final stage. During the Destroy phase, facets can also be applied, although typically these will be specialized facets that help clean up the component and its resources.