mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 22:50:19 +00:00
24 lines
503 B
Rust
24 lines
503 B
Rust
#![allow(non_snake_case)]
|
|
use dioxus::prelude::*;
|
|
|
|
fn main() {
|
|
dioxus_desktop::launch(App);
|
|
}
|
|
|
|
fn App(cx: Scope) -> Element {
|
|
// ANCHOR: rsx
|
|
cx.render(rsx! {
|
|
div {
|
|
onclick: move |_event| {},
|
|
"outer",
|
|
button {
|
|
onclick: move |event| {
|
|
// now, outer won't be triggered
|
|
event.stop_propogation();
|
|
},
|
|
"inner"
|
|
}
|
|
}
|
|
})
|
|
// ANCHOR_END: rsx
|
|
}
|