9 lines
219 B
R
9 lines
219 B
R
fn main() {
|
|
rsx! {
|
|
button {
|
|
id: "start_stop",
|
|
onclick: move |_| timer.with_mut(|t| t.started_at = if t.started_at.is_none() { Some(Instant::now()) } else { None } )
|
|
}
|
|
}
|
|
}
|