Node
A long-lived node a modifier entry is backed by, mirroring androidx.compose.ui.Modifier.Node.
A node is attached to its component's composition before onAttach runs, and detached after onDetach returns. coroutineScope and the capabilities bound to this type, such as observeReads, are available only in between.
A chain attaches and detaches whole: while any node of the chain runs onAttach or onDetach, every node of the chain is attached, so a node may measure or paint its component whatever its place in the chain. The chain is the component's whole modifier, with the nodes of both families; a key change detaches and attaches again only the ComponentNodes.
The library builds two families on it: ComponentNode, which writes onto its component, and ParentLayoutNode, which the parent's layout manager interprets.
Inheritors
Properties
A scope that runs for as long as this node is attached, on the composition's own coroutine context and frame clock. Created on first access and cancelled once onDetach returns.
Whether this node is attached to a composition.
Whether an element update or composition-local refresh automatically invalidates the consumer of this node's state. A parent-layout node invalidates its measuring parent; a component node invalidates its component's DeclaredNodesListener. true by default.
Functions
Visits the nodes of the modifier this node is attached in that hold a place in it, in the order the modifier declares them: every ComponentNode of an additive element, and every ParentLayoutNode. This node is among them if it is one of those. Visits nothing while this node is not attached.