Trait freya::prelude::ComponentFunction
pub trait ComponentFunction<Props, Marker = ()>: Clone + 'static {
// Required method
fn rebuild(&self, props: Props) -> Option<VNode>;
// Provided method
fn id(&self) -> TypeId { ... }
}
Expand description
Any component that implements the ComponentFn
trait can be used as a component.
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
§impl<P> ComponentFunction<P> for Rc<dyn Fn(P) -> Option<VNode>>where
P: 'static,
impl<P> ComponentFunction<P> for Rc<dyn Fn(P) -> Option<VNode>>where P: 'static,
Accept pre-formed component render functions as components