Skip to content

Commit 0615ad0

Browse files
authored
docs: Advanced Guides > Compotion API > Lifecycle Hooks の翻訳 #34 (#89)
1 parent 05f8ab9 commit 0615ad0

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/guide/composition-api-lifecycle-hooks.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# Lifecycle Hooks
1+
# ライフサイクルフック
22

3-
> This guide assumes that you have already read the [Composition API Introduction](composition-api-introduction.html) and [Reactivity Fundamentals](reactivity-fundamentals.html). Read that first if you are new to Composition API.
3+
> このページは、すでに [コンポジション API の基本](composition-api-introduction.html) [リアクティブの基礎](reactivity-fundamentals.html) を読んでいることを前提としています。 コンポジション API を初めて使用する場合は、最初にそちらをお読みください。
44
5-
You can access a component's lifecycle hook by prefixing the lifecycle hook with "on".
5+
ライフサイクルフックの前に "on" をつけることで、コンポーネントのライフサイクルフックにアクセスすることができます。
66

7-
The following table contains how the lifecycle hooks are invoked inside of [setup()](composition-api-setup.html):
7+
[setup()](composition-api-setup.html) 内で、ライフサイクルフックを呼び出す方法は、次の表の通りです:
88

9-
| Options API | Hook inside inside `setup` |
9+
10+
| オプション API | `setup` 内のフック |
1011
| ----------------- | -------------------------- |
11-
| `beforeCreate` | Not needed\* |
12-
| `created` | Not needed\* |
12+
| `beforeCreate` | 不要\* |
13+
| `created` | 不要\* |
1314
| `beforeMount` | `onBeforeMount` |
1415
| `mounted` | `onMounted` |
1516
| `beforeUpdate` | `onBeforeUpdate` |
@@ -21,10 +22,10 @@ The following table contains how the lifecycle hooks are invoked inside of [setu
2122
| `renderTriggered` | `onRenderTriggered` |
2223

2324
:::tip
24-
Because `setup` is run around the `beforeCreate` and `created` lifecycle hooks, you do not need to explicitly define them. In other words, any code that would be written inside those hooks should be written directly in the `setup` function.
25+
`setup` `beforeCreate` `created` のライフサイクルで実行されるため、これらのフックを明示的に定義する必要はありません。言い換えれば、これらのフック内のコードは、 `setup` 内に直接書くべきです。
2526
:::
2627

27-
These functions accept a callback that will be executed when the hook is called by the component:
28+
これらの関数は、コンポーネントからフックが呼び出された時に実行されるコールバックを、受け入れます:
2829

2930
```js
3031
// MyBook.vue

0 commit comments

Comments
 (0)