


During its life a Wicket component goes through three basic stages:

1. *Initialization:* a component is instantiated by Wicket and prepared for the rendering phase.
2. *Rendering:* in this stage Wicket generates component markup. If a component contains children (i.e. is a subclass of _MarkupContainer_) it must first wait for them to be rendered before starting its own rendering. 
3. *Removing:* this stage is triggered when a component is explicitly removed from its component hierarchy, i.e. when its parent invokes _remove(component)_ on it. This stage is facultative and is never triggered for pages.

The following picture shows the state diagram of component lifecycle:

image::../img/component-lifecycle.png[]

Once a component has been removed it can be added again to a container, but the initialization stage won't be executed again.

NOTE: If you read the JavaDoc of class _Component_ you will find a more detailed description of component lifecycle.
However this description introduces some advanced topics we didn't covered yet hence, to avoid confusion, in this chapter some details have been omitted and they will be covered later in the next chapters. 

For now you can consider just the simplified version of the lifecycle described above.

