Skip to main content

bind_fn_name

Function bind_fn_name 

Source
pub fn bind_fn_name(component: &str, field: &str) -> String
Expand description

The binding holding where a component last rendered, so a turn can repaint it. __bind_<Component>_<field>(v) — the write-back a bound input performs.

A FUNCTION rather than statements inlined into the listener closure, because a closure captures the names it touches and a captured state binding is a COPY: the write would land on the copy and the page would never change. A function resolves the module binding directly, which is the same reason the dispatcher’s bind_arm has always worked.