From 2b25d7be69a4759cdd464a7bd778e2d5502814ed Mon Sep 17 00:00:00 2001 From: Leo <3853621+leoelz@users.noreply.github.com> Date: Thu, 7 Dec 2023 13:27:51 -0300 Subject: [PATCH] $ removal --- src/guide/components/events.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/guide/components/events.md b/src/guide/components/events.md index e72d0523a7..b188392d7d 100644 --- a/src/guide/components/events.md +++ b/src/guide/components/events.md @@ -293,14 +293,14 @@ export default { You may also declare and pass `events` as `props`, by prefixing the capitalized event name with `on`. -Using `$props.onEvent` has a different behaviour than using `$emit('event')`, as `$props.onEvent` gets the callback function declared as a listener in the parent (either `@event` or `:onEvent`). +Using `props.onEvent` has a different behaviour than using `emit('event')`, as `props.onEvent` gets the callback function declared as a listener in the parent (either `@event` or `:onEvent`). :::warning -If both `:onEvent` and `@event` are passed `$props.onEvent` might be an array of `functions` instead of `function`, this behavior is not stable and might change in the future. +If both `:onEvent` and `@event` are passed `props.onEvent` might be an array of `functions` instead of `function`, this behavior is not stable and might change in the future. -If no handler is defined, attempting to use `$props.onEvent()` as an emitter will result in a console error. +If no handler is defined, attempting to use `props.onEvent()` as an emitter will result in a console error. -When passing an event handler as a prop and kebab-case is used (ie: `:on-event`), the handler won't be interpreted when using the `$emit('event')` emitter. +When passing an event handler as a prop and kebab-case is used (ie: `:on-event`), the handler won't be interpreted when using the `emit('event')` emitter. ::: -Because of this, it is recommended to use `$emit('event')` instead of `$props.onEvent` when emitting events and declare event listener using event directives as `@event` instead of `:onEvent`. +Because of this, it is recommended to use `emit('event')` instead of `props.onEvent` when emitting events and declare event listener using event directives as `@event` instead of `:onEvent`.