From 6e1090cb895c206e4634811ca236740b8f940f60 Mon Sep 17 00:00:00 2001 From: Nick Mousavi <52695644+biomousavi@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:23:15 +0400 Subject: [PATCH] docs: align custom-directive example with content (#3093) docs: align example description with content --- src/guide/reusability/custom-directives.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/reusability/custom-directives.md b/src/guide/reusability/custom-directives.md index 6b6aa435b9..a8b51935f7 100644 --- a/src/guide/reusability/custom-directives.md +++ b/src/guide/reusability/custom-directives.md @@ -25,7 +25,7 @@ In addition to the default set of directives shipped in core (like `v-model` or We have introduced two forms of code reuse in Vue: [components](/guide/essentials/component-basics) and [composables](./composables). Components are the main building blocks, while composables are focused on reusing stateful logic. Custom directives, on the other hand, are mainly intended for reusing logic that involves low-level DOM access on plain elements. -A custom directive is defined as an object containing lifecycle hooks similar to those of a component. The hooks receive the element the directive is bound to. Here is an example of a directive that focuses an input when the element is inserted into the DOM by Vue: +A custom directive is defined as an object containing lifecycle hooks similar to those of a component. The hooks receive the element the directive is bound to. Here is an example of a directive that adds a class to an element when it is inserted into the DOM by Vue: