DioxusLabs/dioxus · error
root element
Error message
root element
What it means
`root_child_edge_element` resolves a static root element's anchor index and `expect`s it to exist when the root child is an element. This panic fires if the internal invariant that every static root element has an anchor index is violated — a core diffing bug, not user error.
Source
Thrown at packages/core/src/diff/node.rs:373
found
}
}
}
fn root_child_edge_element(
&self,
child: VNodeChild<'_>,
mount: MountId,
target_id: crate::RenderTargetId,
dom: &VirtualDom,
edge: ElementEdge,
) -> Option<ElementId> {
match child {
VNodeChild::Dynamic(anchor) => {
self.dynamic_anchor_edge_element(anchor, mount, dom, target_id, edge)
}
VNodeChild::Element(element) => self.find_static_anchor_in_target(
element.anchor_index().expect("root element"),
mount,
target_id,
dom,
),
VNodeChild::Text(text) => self.find_static_anchor_in_target(
text.anchor_index().expect("root text"),
mount,
target_id,
dom,
),
}
}
fn dynamic_anchor_edge_element(
&self,
anchor: DynamicAnchor<'_>,
mount: MountId,
dom: &VirtualDom,View on GitHub (pinned to 24f6a829df)
Solutions
- This is an internal invariant about root element creation. Report it with a minimal reproduction to the Dioxus issue tracker.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at packages/core/src/diff/node.rs:373 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/82f10ffa6b0c01b7.
Report an issue: GitHub.