pub fn bind_state_init<T>(
child: impl IntoUiNode,
source: impl Fn() -> Var<T> + Send + 'static,
state: impl IntoVar<T>,
) -> UiNodewhere
T: VarValue,Expand description
Helper for declaring state properties that are controlled by a variable.
On init the state closure is called to provide a variable, the 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.