Type Definition perseus::templates::TemplateFn

source · []
pub type TemplateFn<G> = Box<dyn Fn(PageProps) -> View<G> + Send + Sync>;
Expand description

The type of functions that are given a state and render a page. If you’ve defined state for your page, it’s safe to .unwrap() the given Option inside PageProps. If you’re using i18n, an Rc<Translator> will also be made available through Sycamore’s context system.