Skip to main content
This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.

LazyComponent

Trait LazyComponent 

Source
pub trait LazyComponent: 'static {
    type Underlying: BaseComponent;

    // Required method
    fn fetch() -> impl Future<Output = LazyVTable<Self::Underlying>> + Send;
}
Expand description

Implement this trait to support lazily loading a component.

Used in conjunction with the Lazy component.

Required Associated Types§

Source

type Underlying: BaseComponent

The component that is lazily being fetched

Required Methods§

Source

fn fetch() -> impl Future<Output = LazyVTable<Self::Underlying>> + Send

Fetch the component’s impl

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§