Trait sycamore::component::Component [−][src]
pub trait Component<G: GenericNode> {
type Props;
const NAME: &'static str;
fn __create_component(props: Self::Props) -> Template<G>;
}
Expand description
Trait that is implemented by components. Should not be implemented manually. Use the
component
macro instead.
Associated Types
Associated Constants
Required methods
fn __create_component(props: Self::Props) -> Template<G>
fn __create_component(props: Self::Props) -> Template<G>
Create a new component with an instance of the properties.
The double underscores (__
) are to prevent conflicts with other trait methods. This is
because we cannot use fully qualified syntax here because it prevents type inference.