Oops this was an accident

This commit is contained in:
Greg Johnston 2022-11-07 21:26:57 -05:00
parent 9da3c66683
commit 63a2199405
1 changed files with 0 additions and 12 deletions

View File

@ -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>
}
}