Feat: add context to builder
This commit is contained in:
1 parent
fcd68e61d2
commit
cf16090838
8 files changed
+144
-98
No files matched your search
@@ -15,15 +15,16 @@ fn main() {
|
||||
static App: FC<()> = |ctx, _| {
|
||||
log::info!("Ran component");
|
||||
use dioxus::builder::*;
|
||||
ctx.render(|b| {
|
||||
div(b)
|
||||
.child(text("hello"))
|
||||
.listeners([on(b, "click", |_| {
|
||||
//
|
||||
log::info!("button1 clicked!");
|
||||
})])
|
||||
.finish()
|
||||
})
|
||||
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"
|
||||
|
||||
Reference in new issue
Block a user