Feat: view -> render

This commit is contained in:
Jonathan Kelley committed 2021-02-28 21:21:17 -05:00
1 parent 10a236fc65
commit c8bb392cad
24 files changed
+204 -48

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ fn main() {
static App: FC<()> = |ctx, _| {
log::info!("Ran component");
use dioxus::builder::*;
ctx.view(|b| {
ctx.render(|b| {
div(b)
.child(text("hello"))
.listeners([on(b, "click", |_| {
@@ -24,7 +24,7 @@ static App: FC<()> = |ctx, _| {
})])
.finish()
})
// ctx.view(html! {
// ctx.render(html! {
// <div onclick={move |_| log::info!("button1 clicked!")}>
// "Hello"
// // <div class="flex items-center justify-center flex-col">