From 590de19df821e4e28497f1bc4501e9b727bdce47 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 15 Oct 2024 20:27:40 +0200 Subject: [PATCH] better structure --- src/main.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index aa083f7..1f3e917 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,22 +4,17 @@ use osui::{ }; fn main() { - let some_text = app(ComponentParams { - children: vec![], - expr: "".to_string(), - }); - let doc = oml!(div { some_text; }); + let doc = oml!(div {app()}); println!("{:?}", doc); } -fn app(_: ComponentParams) -> Box
{ - oml!( +fn app(_: ComponentParams) -> Div { + *oml!( // Components (C) div { // Props, With components (PC) div () { - // Props (P) text(/* Properties go here, Example: x = 20 y = 5 */) }