wip: staticify?
This commit is contained in:
1 parent
78d093a945
commit
5ad81885e4
21 files changed
+433
-346
No files matched your search
@@ -13,26 +13,27 @@ fn main() {
|
||||
}
|
||||
|
||||
static App: FC<()> = |ctx, _| {
|
||||
log::info!("Ran component");
|
||||
use dioxus::builder::*;
|
||||
todo!()
|
||||
// ctx.render(|b| {
|
||||
// div(b)
|
||||
// .child(text("hello"))
|
||||
// .listeners([on(b, "click", |_| {
|
||||
// //
|
||||
// log::info!("button1 clicked!");
|
||||
// })])
|
||||
// .finish()
|
||||
// })
|
||||
// ctx.render(html! {
|
||||
// <div onclick={move |_| log::info!("button1 clicked!")}>
|
||||
// "Hello"
|
||||
// // <div class="flex items-center justify-center flex-col">
|
||||
// // <div class="font-bold text-xl"> "Count is ..." </div>
|
||||
// // <button onclick={move |_| log::info!("button1 clicked!")}> "increment" </button>
|
||||
// // <button onclick={move |_| log::info!("button2 clicked!")}> "decrement" </button>
|
||||
// // </div>
|
||||
// </div>
|
||||
// })
|
||||
ctx.render(rsx! {
|
||||
div {
|
||||
h1 {"hello"}
|
||||
C1 {}
|
||||
C2 {}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
static C1: FC<()> = |ctx, props| {
|
||||
ctx.render(rsx! {
|
||||
button {
|
||||
"numba 1"
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
static C2: FC<()> = |ctx, props| {
|
||||
ctx.render(rsx! {
|
||||
button {
|
||||
"numba 2"
|
||||
}
|
||||
})
|
||||
};
|
||||
Reference in new issue
Block a user