-
Notifications
You must be signed in to change notification settings - Fork 16
Component lifecycle
Filatov Dmitry edited this page Aug 12, 2015
·
32 revisions
void onInit()
The callback which will be invoked after a component has been created. It's a good place to create initial state for the stateful components.
VNode onRender(
Object attrs,
Array children
)
The callback which will be invoked when a component should be rendered. It's an essential part of component lifecycle. It should return based on attrs
, children
and possible internal state of a component. This method is supposed to be pure, it should have no side effects.
void onMount(
Object attrs
)
The callback which will be invoked after a component has been mounted to the DOM.
void onAttrsReceive(
Object newAttrs,
Object prevAttrs
)
void onUpdate(
Object attrs
)
The callback which will be invoked after a component has updated its DOM.
void onUnmount()
The callback which will be invoked before a component is unmounted from the DOM.