feat: massage lifetimes
This commit is contained in:
1 parent
16dbf4a6f8
commit
9726a065b0
92 files changed
+250
-241
No files matched your search
@@ -3,7 +3,7 @@ use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
static Parent: FC<()> = |cx, props| {
|
||||
static Parent: FC<()> = |(cx, props)| {
|
||||
let value = cx.use_hook(|_| String::new(), |f| &*f, |_| {});
|
||||
|
||||
cx.render(rsx! {
|
||||
@@ -21,7 +21,7 @@ struct ChildProps<'a> {
|
||||
name: &'a String,
|
||||
}
|
||||
|
||||
fn Child<'a>(cx: Context<'a>, props: &'a ChildProps) -> DomTree<'a> {
|
||||
fn Child<'a>((cx, props): Component<'a, ChildProps>) -> DomTree<'a> {
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
h1 { "it's nested" }
|
||||
@@ -35,7 +35,7 @@ struct Grandchild<'a> {
|
||||
name: &'a String,
|
||||
}
|
||||
|
||||
fn Child2<'a>(cx: Context<'a>, props: &Grandchild) -> DomTree<'a> {
|
||||
fn Child2<'a>((cx, props): Component<'a, Grandchild>) -> DomTree<'a> {
|
||||
cx.render(rsx! {
|
||||
div { "Hello {props.name}!" }
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user