Skip to content

Commit 6e1090c

Browse files
authored
docs: align custom-directive example with content (#3093)
docs: align example description with content
1 parent b266b81 commit 6e1090c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/reusability/custom-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ In addition to the default set of directives shipped in core (like `v-model` or
2525

2626
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.
2727

28-
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:
28+
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:
2929

3030
<div class="composition-api">
3131

0 commit comments

Comments
 (0)