Skip to content

layoutWalk

disposition: bound, direction: spec-to-code, basis: implementation

An anatomy rule of the React binding. The element types named below resolve jointly here — which type a node becomes, or what tag and semantics an element takes, is decided by this rule rather than per type.

Keys. container, text, glyph, instance, slot

Operands

Every fact the rule reads. Nothing outside this set participates.

OperandFrom
layoutspec document — ordered LayoutNodes: a leaf is an element name, a branch is one name over ordered children
variants[].layoutspec document — a variant’s layout is a WHOLE structure layered over the default
element.instanceOfspec document
element.typespec document

Derived predicates

NameExpressionSource
derived.conditionsnode.conditions = the variant configurations that place this element here, state-classified props stripped; entries OR'd, each entry a conjunctionshared layout-tree analysis

Cases

Ordered — first match wins.

#WhenEmitsWhy
1node.excludeConditions presentthe element, guarded to NOT render here under the configurations where a variant re-parents itA re-parented element renders in the variant’s position when it matches and in its default position otherwise — never both
2derived.conditions presentthe element wrapped in its render conditionAn element only some variants place exists in the emitted tree exactly when a placing configuration matches
3node.key presentthe element at its tree position, children recursed in authored order — instances and glyphs claimed by their emitters, everything else a container whose tag the semanticsAndTags rule decidesThe walk is the structure; order is the spec’s

Otherwise

Nothing is emitted. — An element absent from every layout renders nowhere

The tree operations are one shared module, so the two emitters cannot walk differently. CSS has no tree: structure reaches the stylesheet only as root-scoped element selectors.