This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on

Trait yew::functional::FunctionProvider

source ·
pub trait FunctionProvider {
    type Properties: Properties + PartialEq;

    // Required method
    fn run(ctx: &mut HookContext, props: &Self::Properties) -> HtmlResult;
Expand description

Trait that allows a struct to act as Function Component.

Required Associated Types§


type Properties: Properties + PartialEq

Properties for the Function Component.

Required Methods§


fn run(ctx: &mut HookContext, props: &Self::Properties) -> HtmlResult

Render the component. This function returns the Html to be rendered for the component.

Equivalent of Component::view.

Object Safety§

This trait is not object safe.



impl FunctionProvider for Suspense

Available on crate features csr or ssr only.

impl<T> FunctionProvider for PhantomComponent<T>
where T: BaseComponent,