aura:valueInit

Indicates that an app or component has been initialized.
This event is automatically fired when an app or component is initialized, prior to rendering. The aura:valueInit event is handled by a client-side controller. A component can have only one <aura:handler name="init"> tag to handle this event.
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

For an example, see Invoking Actions on Component Initialization.

Note

Note

Setting value="{!this}" marks this as a value event. You should always use this setting for an init event.

The init handler contains these required attributes.
Attribute Name Type Description
name String The name of the handler, which must be set to init.
value Object The value that is initialized, which must be set to {!this}.
action Object The client-side controller action that handles the value change.