Skip to content

Commit 58042eb

Browse files
posvachrisvfritz
authored andcommitted
Specify differences between componentUpdated and update (#510)
* Specify differences between componentUpdated and update * better differentiate directive `update` and `componentUpdated`
1 parent de0e173 commit 58042eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/guide/custom-directive.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ A directive definition object can provide several hook functions (all optional):
6161

6262
- `inserted`: called when the bound element has been inserted into its parent node (this only guarantees parent node presence, not necessarily in-document).
6363

64-
- `update`: called whenever the bound element's containing component is updated. The directive's value may or may not have changed. You can skip unnecessary updates by comparing the binding's current and old values (see below on hook arguments).
64+
- `update`: called after the containing component has updated, __but possibly before its children have updated__. The directive's value may or may not have changed, but you can skip unnecessary updates by comparing the binding's current and old values (see below on hook arguments).
6565

66-
- `componentUpdated`: called after the containing component has completed an update cycle.
66+
- `componentUpdated`: called after the containing component __and its children__ have updated.
6767

6868
- `unbind`: called only once, when the directive is unbound from the element.
6969

0 commit comments

Comments
 (0)