pub trait Component {
type Props: Clone + Send + Sync + 'static;
// Required methods
fn name() -> &'static str;
fn render(props: Self::Props) -> View;
}Expand description
Trait implemented by every renderable unit. The #[component] macro
generates an implementation pointing at the component’s render fn.
Components receive their props by value; reactive state lives in signals captured inside the body. Components are only invoked on the server.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".