Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc for component-level action has a coding mistake #1005

Open
bruceesmith opened this issue Dec 9, 2024 · 1 comment
Open

Doc for component-level action has a coding mistake #1005

bruceesmith opened this issue Dec 9, 2024 · 1 comment

Comments

@bruceesmith
Copy link
Contributor

In Component-level Actions the body of function OnMount is incorrect

func (h *hello) OnMount(ctx app.Context) { ctx.Handle("greet") // Registering action handler. }

It should be

func (h *hello) OnMount(ctx app.Context) { ctx.Handle("greet", handleGreet) // Registering action handler. }

@bruceesmith
Copy link
Contributor Author

Correction. Code should be

func (h *hello) OnMount(ctx app.Context) { ctx.Handle("greet", h.handleGreet) // Registering action handler. }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant