Fix eventhandler optional (#2119)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-03-20 09:04:37 -07:00
1 parent 9f283f571f
commit 44e997f7df
2 files changed
+13 -3

No files matched your search

+2 -3
View File
@@ -24,9 +24,7 @@ enum Route {
#[component]
fn Homepage() -> Element {
rsx! {
h1 { "Welcome home" }
}
rsx! { h1 { "Welcome home" } }
}
#[component]
@@ -52,6 +50,7 @@ fn Nav() -> Element {
to: Route::Blog {
id: "Brownies".to_string(),
},
onclick: move |_| { println!("Clicked on Brownies") },
"Learn Brownies"
}
}