Skip to content

Commit bbe7d4e

Browse files
authored
[Amendment] add created custom element hook (#203)
1 parent de64615 commit bbe7d4e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

active-rfcs/0012-custom-directive-api-change.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ Make custom directive hook names more consistent with the component lifecycle.
4646

4747
Existing hooks are renamed to map better to the component lifecycle, with some timing adjustments. Arguments passed to the hooks remain unchanged.
4848

49-
- `bind` -> `beforeMount`
50-
- `inserted` -> `mounted`
51-
- `beforeUpdate` *new, called before the element itself is updated*
49+
- **new** `created` (called before vnode props are applied to DOM node)
50+
- `bind` -> `beforeMount` (called after vnode props have been applied to DOM node)
51+
- `inserted` -> `mounted` (called after children have been inserted into the DOM node, and the DOM node itself has been inserted into parent element)
52+
- **new** `beforeUpdate` (called before the element itself is updated)
5253
- ~~`update`~~ *removed, use `updated` instead*
53-
- `componentUpdated` -> `updated`
54-
- `beforeUnmount` *new*
54+
- `componentUpdated` -> `updated` (called after the element itself and its children have been updated)
55+
- **new** `beforeUnmount`
5556
- `unbind` -> `unmounted`
5657

5758
## Usage on Components

0 commit comments

Comments
 (0)