use htmlrs::{component, html, view, Children, IntoView}; #[component] fn Text(text: String) -> impl IntoView { view! {{text}} } #[component] fn TextInto(#[prop(into)] text: String) -> impl IntoView { view! {{text}} } #[component] fn Page(children: Children) -> impl IntoView { view! {
{children()}
} } fn main() { let page = html! { }; println!("{}", page); assert_eq!(page, "
helloworld
") }