Follow-up from "Bring back hovering - 1st iteration (behind feature flag)"
The following discussion from !124863 (merged) should be addressed:
-
@markrian started a discussion: nitpick: Defining a function in the template isn't ideal, since it means the function is recreated on each render.
We have two options here:
- Extract this to a method, e.g.,
onPinRemove
. - Replace this with just a method call.
The second option means something like this:
@pin-remove="$emit('pin-remove', $event)"
That way, I think Vue will cache the implied function between renders rather than recreate it.
- Extract this to a method, e.g.,