Views: 3023
Last Modified: 27.04.2022
In addition to native directives (such as v-model
и v-show
), Vue 3 also allows you to register your own custom directives.
It's an important to know that you need to use components instead of directives to create repeatedly used content.
Nevertheless, user directives can be very useful for executing low-level operations with DOM and when configuring supplemental behaviour (for example, action when hovering on the element).
You can find more details on capabilities of directives in the Vue documentation.