Skip to main content

component

Function component 

Source
pub fn component<P, F>(props: P, render: F) -> Element
where P: PartialEq + 'static, F: for<'a, 'ctx> FnOnce(&mut RenderCx<'a, 'ctx>, &P) -> Element + 'static,
Expand description

Declares a real component boundary whose hooks, children and compiled output are retained. Unchanged props and clean dependencies reuse the committed output without executing render.