Skip to content

Commit 29cf54c

Browse files
docs: document the removal of binding.expression (#1133)
1 parent bcde21b commit 29cf54c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/guide/migration/custom-directives.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ badges:
99

1010
The hook functions for directives have been renamed to better align with the component lifecycle.
1111

12+
Additionally, the `expression` string is no longer passed as part of the `binding` object.
13+
1214
## 2.x Syntax
1315

1416
In Vue 2, custom directives were created by using the hooks listed below to target an element’s lifecycle, all of which are optional:

src/guide/migration/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following consists a list of breaking changes from 2.x:
100100
- The `destroyed` lifecycle option has been renamed to `unmounted`
101101
- The `beforeDestroy` lifecycle option has been renamed to `beforeUnmount`
102102
- [Props `default` factory function no longer has access to `this` context](/guide/migration/props-default-this.html)
103-
- [Custom directive API changed to align with component lifecycle](/guide/migration/custom-directives.html)
103+
- [Custom directive API changed to align with component lifecycle and `binding.expression` removed](/guide/migration/custom-directives.html)
104104
- [The `data` option should always be declared as a function](/guide/migration/data-option.html)
105105
- [The `data` option from mixins is now merged shallowly](/guide/migration/data-option.html#mixin-merge-behavior-change)
106106
- [Attributes coercion strategy changed](/guide/migration/attribute-coercion.html)

0 commit comments

Comments
 (0)