Trait Component

Source
pub trait Component {
    type Props: Props;
    type Element;

    // Required method
    fn create_element(
        self,
        props: Self::Props,
        key: Option<Key>,
    ) -> Self::Element;
}

Required Associated Types§

Source

type Props: Props

Source

type Element

Output of create_element. Many components may return Option<Element> in UseRender::use_render while return Element in create_element. Thus this type parameter exists.

Required Methods§

Source

fn create_element(self, props: Self::Props, key: Option<Key>) -> Self::Element

Implementors§