Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/api/reactivity-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,19 +278,6 @@
// -> logs 1
```

副作用のクリーンアップ:

```js
watchEffect(async (onCleanup) => {
const { response, cancel } = doAsyncWork(id.value)
// `cancel` は `id` が変更された場合に呼ばれます
// 前の保留中のリクエストが完了していない場合は
// キャンセルされます
onCleanup(cancel)
data.value = await response
})
```

ウォッチャーの停止:

```js
Expand Down Expand Up @@ -528,7 +515,7 @@
ウォッチャーの一時停止 / 再開: <sup class="vt-badge" data-text="3.5+" />

```js
const { stop, pause, resume } = watchEffect(() => {})
const { stop, pause, resume } = watch(() => {})

// ウォッチャーを一時停止する
pause()
Expand Down