Function zng_wgt::on_update

source ·
pub fn on_update(
    child: impl UiNode,
    handler: impl WidgetHandler<OnNodeOpArgs>
) -> impl UiNode
Expand description

P Widget update event.

This property calls handler every UI update, after the widget content updates. Updates happen in high volume in between idle moments, so the handler code should be considered a hot-path.

§Handlers

You can use one of the handler macros, hn! or hn_once!, to declare a handler closure. You must avoid using the async handlers as they cause an update every time the UI task advances from an await point causing another task to spawn.