docs: Fix 08_parent_child.md callback example code. (#1976)

This commit is contained in:
Gabriel Hansson 2023-11-03 21:58:45 +01:00 committed by GitHub
parent 3adfd334df
commit ba4d226004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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