class UIBeforeRenderEvent

extends ManagedEvent

Event that is emitted on a particular UI component before it is fist rendered, only once. Should not be propagated.

Note: The UIBeforeRenderEvent is emitted only once, before a component is rendered the first time, and can be observed using an onBeforeRender preset handler property. By contrast, a plain UIComponentEvent is emitted each time after a UI component is rendered, i.e. whenever a change occurs to its display properties (or its child components’), which can be observed using an onRendered preset handler property.

Example (preset)

The following example shows how to observe this event using a preset view constructor. An event handler on the Activity class can be used to store a reference to rendered UI components (from .source), which may be useful to update component instances when needed.

export default UICell.with(
    tl("Enter your name: "),
      onBeforeRender: "textFieldRendered()",
      onChange: "textFieldChanged()"


<TSource extends UIComponent>(source: TSource): UIBeforeRenderEvent<TSource>



Event source UI component.



Inherited from ManagedEvent.name.


(): Readonly<this>

Inherited from ManagedEvent.freeze.