use hirola_macros::{component, html}; use hirola_ssr::{render_to_string, SsrNode}; #[component] fn MyComponent() -> SsrNode { let world = "planet"; html! {
{world}
} } #[component] fn MyComponentWithProps(world: &'static str) -> SsrNode { html! {{world}
} } #[test] fn it_renders_component() { let result = render_to_string({ html! { <>planet
", result); } #[test] fn it_renders_component_with_props() { let result = render_to_string({ html! { <>hirola
", result); }