1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pub type FragmentProps = crate::OptionalChildrenProps;
pub struct Fragment;
impl crate::UseRenderStatic for Fragment {
type RenderArg = FragmentProps;
type RenderOutput = crate::FragmentElement;
#[inline]
fn use_render(props: &Self::RenderArg) -> Self::RenderOutput {
crate::FragmentElement {
children: props.children.clone(),
key: None,
}
}
}
impl crate::ComponentStatic for Fragment {
type Props = FragmentProps;
type Element = crate::FragmentElement;
#[inline]
fn create_element(props: Self::Props, key: Option<crate::Key>) -> Self::Element {
crate::FragmentElement {
children: props.children,
key,
}
}
}