Skip to content

Commit

Permalink
docs: Fix 08_parent_child.md callback example code. (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbz00 authored Nov 3, 2023
1 parent 3adfd33 commit ba4d226
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/book/src/view/08_parent_child.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit ba4d226

Please sign in to comment.