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.
| Operand | From |
|---|---|
layout | spec document — ordered LayoutNodes: a leaf is an element name, a branch is one name over ordered children |
variants[].layout | spec document — a variant’s layout is a WHOLE structure layered over the default |
element.instanceOf | spec document |
element.type | spec document |
Derived predicates
| Name | Expression | Source |
|---|---|---|
derived.conditions | node.conditions = the variant configurations that place this element here, state-classified props stripped; entries OR'd, each entry a conjunction | shared layout-tree analysis |
Cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | node.excludeConditions present | the element, guarded to NOT render here under the configurations where a variant re-parents it | A re-parented element renders in the variant’s position when it matches and in its default position otherwise — never both |
| 2 | derived.conditions present | the element wrapped in its render condition | An element only some variants place exists in the emitted tree exactly when a placing configuration matches |
| 3 | node.key present | the 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 decides | The 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.