diff --git a/irisia-book/src/get_started/first_window.md b/irisia-book/src/get_started/first_window.md index c5d43b8..def93e8 100644 --- a/irisia-book/src/get_started/first_window.md +++ b/irisia-book/src/get_started/first_window.md @@ -37,6 +37,7 @@ use irisia::{ textbox::TextBox, Element, render_fn, + element::{NeverInitalized, NoProps}, }; #[derive(Default)] @@ -49,6 +50,13 @@ impl Element for MyApp { text: "hello world" } } + + fn create(_: irisia::element::RuntimeInit) -> Self { + Self{} + } + + type Props<'a> = NoProps; + type ChildProps<'a> = NeverInitalized; } ``` @@ -81,7 +89,7 @@ use irisia::{ # #[irisia::main] async fn main() { - Window::new::("my first app").await.join().await; + Window::new::("my first app").await.unwrap().join().await; } ``` diff --git a/irisia-core/Cargo.toml b/irisia-core/Cargo.toml index 06091c3..7d04bb4 100644 --- a/irisia-core/Cargo.toml +++ b/irisia-core/Cargo.toml @@ -11,4 +11,4 @@ irisia_backend = { path = "../irisia-backend", features = ["fps_recorder"] } anyhow = "1" take_mut = "0.2" smallvec = "1.9" -tokio = { version = "1.28", features = ["sync", "time", "rt-multi-thread"] } +tokio = { version = "1.28", features = ["sync", "time", "macros", "rt-multi-thread"] }