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