Frontend generate children
This commit is contained in:
@@ -50,5 +50,5 @@ fn BenchmarkApp(cx: &Arc<Context>, items: &usize) -> View {
|
||||
"Hello, world!"
|
||||
}
|
||||
}
|
||||
.view(cx.clone())
|
||||
.view(&cx)
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ fn App(cx: &Arc<Context>) -> View {
|
||||
rsx! {
|
||||
"Hello World"
|
||||
}
|
||||
.view(cx.clone())
|
||||
.view(&cx)
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ fn App(cx: &Arc<Context>) -> View {
|
||||
rsx! {
|
||||
"Hello, world!"
|
||||
}
|
||||
.view(cx.clone())
|
||||
.view(&cx)
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ fn App(cx: &Arc<Context>) -> View {
|
||||
rsx! {
|
||||
MyComponent { "Hello world!" }
|
||||
}
|
||||
.view(cx.clone())
|
||||
.view(&cx)
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn MyComponent(cx: &Arc<Context>, children: &Rsx) -> View {
|
||||
children.view(cx.clone())
|
||||
children.view(&cx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user