init

inline fun init(crossinline block: T.() -> Unit)

Runs block, with the typed component as this, exactly once: on the pass that creates the node, after the set/update blocks declared above it in the same update lambda have run against the freshly built component. Use it for setup that must happen once at creation but needs a value set/update computed - a value the factory cannot see - and that reconcile would otherwise redo on every composition.

The blocks run in the order the update lambda declares them, so an init that needs what another block writes is declared after it.

Parameters

block

the setup to run against the freshly built component. A node released and built again runs it against the new component.

See also

Updater.init