Skip to content

Custom event in custom components ? #359

Answered by jkelleyrtp
loloof64 asked this question in Q&A
Discussion options

You must be logged in to vote

While there's not really a way of "emitting" into parent events, you can just pass a handler in through BoardProps called "on_won" and then call it with whatever event you want.

https://dioxuslabs.com/guide/components/component_children.html#passing-handlers

I think this solves your use case - you want handlers above to be passed into components.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@loloof64
Comment options

@loloof64
Comment options

Answer selected by loloof64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants