Function zng::widget::node::bind_state

source ยท
pub fn bind_state<T>(
    child: impl UiNode,
    source: impl IntoVar<T>,
    state: impl IntoVar<T>,
) -> impl UiNode
where T: VarValue,
Expand description

Helper for declaring state properties that are controlled by a variable.

On init the state variable is set to source and bound to it, you can use this to create state properties that map from a context variable or to create composite properties that merge other state properties.