WIP: remove FC
This commit is contained in:
1 parent
3740f81383
commit
92d9521a73
24 files changed
+801
-451
No files matched your search
@@ -0,0 +1,41 @@
|
||||
use dioxus_core::prelude::*;
|
||||
use dioxus_core::scope::FC;
|
||||
use dioxus_core_macro::fc;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
// #[derive(PartialEq)]
|
||||
// pub struct Example<'a> {
|
||||
// b: &'a str,
|
||||
// ___p: std::marker::PhantomData<&'a ()>,
|
||||
// }
|
||||
|
||||
// impl<'a> FC for Example<'a> {
|
||||
// fn render(ctx: Context<'_>, props: &Example<'a>) -> DomTree {
|
||||
// let Example { b, .. } = props;
|
||||
// {
|
||||
// ctx.render(rsx! {
|
||||
// div { "abcd {b}" }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// always try to fill in with Default
|
||||
|
||||
#[fc]
|
||||
fn Example(ctx: Context, a: &str, b: &str, c: &str) -> DomTree {
|
||||
ctx.render(rsx! {
|
||||
div {
|
||||
SomeComponent {
|
||||
a: "123"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[fc]
|
||||
fn SomeComponent(ctx: Context, a: &str, b: &str) -> DomTree {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Reference in new issue
Block a user