Function from_fn

Source
pub fn from_fn<P: PartialEq + 'static>(
    key: impl Hash,
    props: P,
    comp: impl Fn(&P) -> Element + 'static,
) -> Element
Expand description

Create a component instance from a given Key, Props and Render function.