From b525c69b64529d9aaacf53d0a2ff23fb48673f0f Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Tue, 8 Jun 2021 20:58:43 +0900 Subject: [PATCH] Add onActivated and onDeacitvated hooks to the list https://github.com/vuejs/docs-next/commit/c4efde2cf87edcff663f609baf7c4fb55ee317ac --- src/api/composition-api.md | 3 +++ src/guide/composition-api-lifecycle-hooks.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/api/composition-api.md b/src/api/composition-api.md index 2494474f..e641fffe 100644 --- a/src/api/composition-api.md +++ b/src/api/composition-api.md @@ -117,6 +117,9 @@ The component instance context is also set during the synchronous execution of l - `errorCaptured` -> `onErrorCaptured` - `renderTracked` -> `onRenderTracked` - `renderTriggered` -> `onRenderTriggered` + - `activated` -> `onActivated` + - `deactivated` -> `onDeactivated` + - **See also**: [Composition API lifecycle hooks](../guide/composition-api-lifecycle-hooks.html) diff --git a/src/guide/composition-api-lifecycle-hooks.md b/src/guide/composition-api-lifecycle-hooks.md index 0ec14a5b..8a01dd46 100644 --- a/src/guide/composition-api-lifecycle-hooks.md +++ b/src/guide/composition-api-lifecycle-hooks.md @@ -22,6 +22,9 @@ | `errorCaptured` | `onErrorCaptured` | | `renderTracked` | `onRenderTracked` | | `renderTriggered` | `onRenderTriggered` | +| `activated` | `onActivated` | +| `deactivated` | `onDeactivated` | + :::tip `setup` は `beforeCreate` と `created` のライフサイクルで実行されるため、これらのフックを明示的に定義する必要はありません。言い換えれば、これらのフック内のコードは、 `setup` 内に直接書くべきです。