wip: rename fc to component
This commit is contained in:
1 parent
85ab8b91c6
commit
1e4a599d14
61 files changed
+524
-145
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
fn main() {
|
||||
let _ = VirtualDom::new(App);
|
||||
}
|
||||
|
||||
fn App(cx: Context, _props: &()) -> Element {
|
||||
//
|
||||
cx.render(rsx!(
|
||||
div {
|
||||
Child {}
|
||||
}
|
||||
))
|
||||
}
|
||||
|
||||
struct ChildProps<'a> {
|
||||
click_handler: EventHandler<'a>,
|
||||
}
|
||||
|
||||
fn Child(cx: Context, _props: &()) -> Element {
|
||||
//
|
||||
cx.render(rsx!(
|
||||
div {
|
||||
h1 {
|
||||
"Hello, World!"
|
||||
}
|
||||
}
|
||||
))
|
||||
}
|
||||
Reference in new issue
Block a user