mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-18 08:33:07 +00:00
18 lines
327 B
Rust
18 lines
327 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! {
|
||
|
button {
|
||
|
onclick: move |event| println!("Clicked! Event: {event:?}"),
|
||
|
"click me!"
|
||
|
}
|
||
|
})
|
||
|
// ANCHOR_END: rsx
|
||
|
}
|