Oops this was an accident
This commit is contained in:
parent
9da3c66683
commit
63a2199405
|
@ -5,7 +5,6 @@ pub fn simple_counter(cx: Scope) -> web_sys::Element {
|
|||
|
||||
view! { cx,
|
||||
<div>
|
||||
<MyComponent><p>"Here's the child"</p></MyComponent>
|
||||
<button on:click=move |_| set_value(0)>"Clear"</button>
|
||||
<button on:click=move |_| set_value.update(|value| *value -= 1)>"-1"</button>
|
||||
<span>"Value: " {move || value().to_string()} "!"</span>
|
||||
|
@ -13,14 +12,3 @@ pub fn simple_counter(cx: Scope) -> web_sys::Element {
|
|||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn MyComponent(cx: Scope, children: Option<Box<dyn Fn() -> Vec<Element>>>) -> Element {
|
||||
view! {
|
||||
cx,
|
||||
<my-component>
|
||||
<p>"Here's the child you passed in: "</p>
|
||||
<slot></slot>
|
||||
</my-component>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue