visitChildElements abstract method

void visitChildElements(
  1. ElementVisitor visitor
)

Walks the children of this component.

This is useful for applying changes to children after they are built without waiting for the next frame, especially if the children are known.

Calling this method is potentially expensive for elements with a lot of children (O(N) in the number of children).

Calling this method recursively is extremely expensive (O(N) in the number of descendants), and should be avoided if possible. Generally it is significantly cheaper to use an InheritedComponent and have the descendants pull data down, than it is to use visitChildElements recursively to push data down to them.

Implementation

void visitChildElements(ElementVisitor visitor);