You probably didn't know you could do this in vue! #shorts #vue

preview_player
Показать описание

#vue #vue3 #vue3compositionapi #slots #props

Creative Commons / Attribution 4.0 International (CC BY 4.0)
Рекомендации по теме
Комментарии
Автор

This is generally considered a bad practice because based on your example you can also have "name" and "id" as more global (scoped to component) variables. Of course, upon, further analyzing your codebase it will be clear what you are referencing but you have to be more cautious with that for example when you are searching for "name" that "name" can be two different variables and this can lead to bugs. Some eslint rules will even mark this as an error by violating vue/no-template-shadow rule.

drizzletone