AttachDetachHandler

Manages dispatching attach/detach events to a set of Attachable.

For Spec Components, this will invoke OnAttached when a component is attached to the ComponentTree and OnDetached when a component is detached from the tree.

For Kotlin components, this will handle dispatching callbacks registered with the useEffect hook.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun onAttached(attachables: List<Attachable>?)

Marks the given Attachables as attached, invoking attach if they weren't already attached. Any Attachables that were attached and are no longer attached will be detached. Note that identity is determined by Attachable#getUniqueId().

Link copied to clipboard

Detaches all Attachables currently attached.