Fixed simple example
This commit is contained in:
@@ -10,7 +10,7 @@ pub fn main() {
|
|||||||
#[component]
|
#[component]
|
||||||
fn App(cx: &Arc<Context>) -> View {
|
fn App(cx: &Arc<Context>) -> View {
|
||||||
rsx! {
|
rsx! {
|
||||||
MyComponent { "Hello world!" }
|
MyComponent { "------ example" }
|
||||||
}
|
}
|
||||||
.view(&cx)
|
.view(&cx)
|
||||||
}
|
}
|
||||||
@@ -18,8 +18,8 @@ fn App(cx: &Arc<Context>) -> View {
|
|||||||
#[component]
|
#[component]
|
||||||
fn MyComponent(cx: &Arc<Context>, children: &Rsx) -> View {
|
fn MyComponent(cx: &Arc<Context>, children: &Rsx) -> View {
|
||||||
rsx! {
|
rsx! {
|
||||||
"Simple"
|
|
||||||
@{children}
|
@{children}
|
||||||
|
"Simple"
|
||||||
}
|
}
|
||||||
.view(&cx)
|
.view(&cx)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user