sycamore::prelude

Trait Component

pub trait Component<T, V, S>
where T: Props,
{ // Required method fn create(self, props: T) -> V; }
Expand description

A trait that is automatically implemented by all components.

Required Methods§

fn create(self, props: T) -> V

Instantiate the component with the given props and reactive scope.

Implementors§

§

impl<F, T, V> Component<T, V, ((),)> for F
where T: Props, F: FnOnce(T) -> V,

§

impl<F, V> Component<(), V, ()> for F
where F: FnOnce() -> V,