Updated readme for the new syntax with rsx

This commit is contained in:
2025-08-01 16:33:35 -05:00
parent 73e2c214ee
commit bbff192788
+5 -4
View File
@@ -21,14 +21,15 @@
</p>
```rust
use osui::{style::Transform, Screen};
use osui::prelude::*;
fn main() -> std::io::Result<()> {
let screen = Screen::new();
screen
.draw(format!("Hello, World"))
.component(Transform::center());
rsx! {
"Hello, World"
}
.draw(&screen);
screen.run()
}