Skip to main content

Component

Trait Component 

Source
pub trait Component {
    // Required method
    fn render(&self, cx: Scope) -> View;
}
Expand description

A component that can render itself to a View.

Required Methods§

Source

fn render(&self, cx: Scope) -> View

Render this component to a View tree.

Implementors§

Source§

impl<F> Component for F
where F: Fn(Scope) -> View,

Blanket implementation for closures that take Scope and return View. This enables: telex::run(|cx| view! { … })