mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-11 21:32:27 +00:00
d9546d9504
* feat: use synchronous router design * feat: function to get router out of dom * chore: restructure workspace to use renderers as packages, not features
24 lines
500 B
Rust
24 lines
500 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.cancel_bubble();
|
|
},
|
|
"inner"
|
|
}
|
|
}
|
|
})
|
|
// ANCHOR_END: rsx
|
|
}
|