mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-13 06:12:32 +00:00
17 lines
352 B
Rust
17 lines
352 B
Rust
|
use dioxus::prelude::*;
|
||
|
use dioxus_desktop::{Config, LogicalSize, WindowBuilder};
|
||
|
|
||
|
fn main() {
|
||
|
dioxus_desktop::launch(|cx| cx.render(rsx! { async_app {} }));
|
||
|
}
|
||
|
|
||
|
async fn async_app(cx: Scope<'_>) -> Element {
|
||
|
tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
|
||
|
|
||
|
cx.render(rsx! {
|
||
|
div {
|
||
|
"hi!"
|
||
|
}
|
||
|
})
|
||
|
}
|