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
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 ()
You can’t perform that action at this time.
0 commit comments