pub trait Node {
// Required method
fn to_node(&self) -> AnyNode;
// Provided methods
fn to_children(&self) -> Option<Children> { ... }
fn into_node(self) -> AnyNode
where Self: Sized { ... }
fn into_children(self) -> Option<Children>
where Self: Sized { ... }
}
Expand description
Corresponding to ReactNode
in typescript
type ReactNode = ReactElement | string | number | ReactNodeArray | boolean | null | undefined;