pub enum DynamicNode {
Component(VComponent),
Text(VText),
Placeholder(VPlaceholder),
Fragment(Vec<VNode>),
}
Expand description
A node created at runtime
This node’s index in the DynamicNode list on VNode should match its respective Dynamic
index
Variants§
Component(VComponent)
A component node
Most of the time, Dioxus will actually know which component this is as compile time, but the props and assigned scope are dynamic.
The actual VComponent can be dynamic between two VNodes, though, allowing implementations to swap the render function at runtime
Text(VText)
A text node
Placeholder(VPlaceholder)
A placeholder
Used by suspense when a node isn’t ready and by fragments that don’t render anything
In code, this is just an ElementId whose initial value is set to 0 upon creation
Fragment(Vec<VNode>)
A list of VNodes.
Note that this is not a list of dynamic nodes. These must be VNodes and created through conditional rendering or iterators.
Implementations§
Source§impl DynamicNode
impl DynamicNode
Sourcepub fn make_node<'c, I>(into: impl IntoDynNode<I> + 'c) -> DynamicNode
pub fn make_node<'c, I>(into: impl IntoDynNode<I> + 'c) -> DynamicNode
Convert any item that implements IntoDynNode
into a DynamicNode
Trait Implementations§
Source§impl Clone for DynamicNode
impl Clone for DynamicNode
Source§fn clone(&self) -> DynamicNode
fn clone(&self) -> DynamicNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more