Skip to content

Commit 27dd985

Browse files
authored
docs: fixes in 3.5 updates on reactivity-api page (#3016)
1 parent e20eb77 commit 27dd985

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/api/reactivity-core.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -278,19 +278,6 @@ Runs a function immediately while reactively tracking its dependencies and re-ru
278278
// -> logs 1
279279
```
280280
281-
Side effect cleanup:
282-
283-
```js
284-
watchEffect(async (onCleanup) => {
285-
const { response, cancel } = doAsyncWork(id.value)
286-
// `cancel` will be called if `id` changes
287-
// so that previous pending request will be cancelled
288-
// if not yet completed
289-
onCleanup(cancel)
290-
data.value = await response
291-
})
292-
```
293-
294281
Stopping the watcher:
295282
296283
```js
@@ -528,7 +515,7 @@ Watches one or more reactive data sources and invokes a callback function when t
528515
Pausing / resuming the watcher: <sup class="vt-badge" data-text="3.5+" />
529516
530517
```js
531-
const { stop, pause, resume } = watchEffect(() => {})
518+
const { stop, pause, resume } = watch(() => {})
532519

533520
// temporarily pause the watcher
534521
pause()

0 commit comments

Comments
 (0)