mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 20:53:06 +00:00
d8942a255b
* Fix #2104: fmt incorrectly using 1-indexing for columns * Clippy...
18 lines
453 B
R
18 lines
453 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
|
|
};
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|