mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
docs: Fix 08_parent_child.md callback example code. (#1976)
This commit is contained in:
parent
3adfd334df
commit
ba4d226004
1 changed files with 1 additions and 2 deletions
|
@ -113,8 +113,7 @@ pub fn App() -> impl IntoView {
|
|||
#[component]
|
||||
pub fn ButtonB<F>(on_click: F) -> impl IntoView
|
||||
where
|
||||
F: Fn(MouseEvent) + 'static,
|
||||
pub fn ButtonB(#[prop(into)] on_click: Callback<MouseEvent>) -> impl IntoView
|
||||
F: Fn(MouseEvent) + 'static
|
||||
{
|
||||
view! {
|
||||
<button on:click=on_click>
|
||||
|
|
Loading…
Reference in a new issue