Skip to content

Passing functions as props vs Emitting events #9577

You must be logged in to vote

I prefer to design it this way. On components, Vue prefers to distinguish props from events. It is not like react that passes all properties or events to components through props. Differentiating props and events is beneficial to component maintenance, but users must make a clear distinction when writing components. This is a design choice and trade-off.

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by baiwusanyu-c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants