diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md
index a0a5bb96..09520a18 100644
--- a/src/guide/migration/custom-directives.md
+++ b/src/guide/migration/custom-directives.md
@@ -3,31 +3,30 @@ badges:
- breaking
---
-# Custom Directives
Highlight this text bright yellow
+このテキストを明るい黄色で強調表示します
``` ```js @@ -38,21 +37,22 @@ Vue.directive('highlight', { }) ``` -Here, in the initial setup for this element, the directive binds a style by passing in a value, that can be updated to different values through the application. +この要素の初期設定では、ディレクティブは値を渡してスタイルをバインドします。値は、アプリケーションにてさまざまな値に更新できます。 -## 3.x Syntax +## 3.x の文法 -In Vue 3, however, we’ve created a more cohesive API for custom directives. As you can see, they differ greatly from our component lifecycle methods even though we’re hooking into similar events. We’ve now unified them like so: + +ただし、Vue 3 では、カスタムディレクティブ用のよりまとまりのある API を作成しました。Vue 2 では、似たようなイベントにフックしているにもかかわらず、コンポーネントのライフサイクルメソッドとは大きく異なります。これらを次のように統合しました。 - bind → **beforeMount** - inserted → **mounted** -- **beforeUpdate**: new! this is called before the element itself is updated, much like the component lifecycle hooks. -- update → removed! There were too many similarities to updated, so this is redundant. Please use updated instead. +- **beforeUpdate**: 追加されました! これは、コンポーネントのライフサイクルフックのように、要素自体が更新される前に呼び出されます。 +- update → 削除されました! updated と似たようなものが多すぎて冗長です。代わりに updated を使ってください。 - componentUpdated → **updated** -- **beforeUnmount** new! similar to component lifecycle hooks, this will be called right before an element is unmounted. +- **beforeUnmount**: 追加されました! コンポーネントのライフサイクルフックと同様に、要素がマウント解除される直前に呼び出されます。 - unbind -> **unmounted** -The final API is as follows: +最終的な API は次のとおりです。 ```js const MyDirective = { @@ -60,15 +60,15 @@ const MyDirective = { mounted() {}, beforeUpdate() {}, updated() {}, - beforeUnmount() {}, // new + beforeUnmount() {}, // 追加 unmounted() {} } ``` -The resulting API could be used like this, mirroring the example from earlier: +Vue 3 の API は、先ほどの例を用いてこのように使用できます。 ```html -Highlight this text bright yellow
+このテキストを明るい黄色で強調表示します
``` ```js @@ -81,28 +81,28 @@ app.directive('highlight', { }) ``` -Now that the custom directive lifecycle hooks mirror those of the components themselves, they become easier to reason about and remember! - -## Implementation Details +カスタムディレクティブのライフサイクルフックがコンポーネントと同じになったことで、理由を説明したり、覚えるのがより簡単になりました。 -In Vue 3, we're now supporting fragments, which allow us to return more than one DOM node per component. You can imagine how handy that is for something like a component with multiple lis or the children elements of a table: +### 特別な問題への対処: コンポーネントのインスタンスへのアクセス -```html - -