From 8f388e712e003a4a195c92aced4a522c14b6107a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Mon, 29 Apr 2019 12:07:20 +0200 Subject: [PATCH] [DOC] doc: add info on hook call order in documentation --- doc/component.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/component.md b/doc/component.md index 7b8e1e4e..045103d7 100644 --- a/doc/component.md +++ b/doc/component.md @@ -178,7 +178,12 @@ a owl component: | **[patched](#patchedsnapshot)** | just after the DOM is patched | | **[willUnmount](#willUnmount)** | just before removing component from DOM | -Note: no hook method should ever be called manually. They are supposed to be +Notes: + +- hooks call order is precisely defined: `[willX]` hooks are called first on parent, + then on children, and `[Xed]` are called in the reverse order: first children, + then parent. +- no hook method should ever be called manually. They are supposed to be called by the owl framework whenever it is required. #### `constructor(parent, props)`