leptos-use/examples/use_webtransport/src/log_display.rs
2023-08-31 20:12:48 +01:00

12 lines
281 B
Rust

use leptos::*;
#[component]
pub fn LogDisplay(#[prop(into)] log: Signal<Vec<String>>) -> impl IntoView {
view! {
<div>
<ul>
{move || log().iter().map(|l| view! { <li>{l}</li> }).collect::<Vec<_>>()}
</ul>
</div>
}
}