File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -278,19 +278,6 @@ Runs a function immediately while reactively tracking its dependencies and re-ru
278
278
// -> logs 1
279
279
` ` `
280
280
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
-
294
281
Stopping the watcher:
295
282
296
283
` ` ` js
@@ -528,7 +515,7 @@ Watches one or more reactive data sources and invokes a callback function when t
528
515
Pausing / resuming the watcher: <sup class="vt-badge" data-text="3.5+" />
529
516
530
517
` ` ` js
531
- const { stop , pause , resume } = watchEffect (() => {})
518
+ const { stop , pause , resume } = watch (() => {})
532
519
533
520
// temporarily pause the watcher
534
521
pause ()
You can’t perform that action at this time.
0 commit comments