Skip to content

Commit

Permalink
docs: fix flush timing URL (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed May 18, 2022
1 parent 68ae8d1 commit 8cc3d35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/useRefHistory/index.md
Expand Up @@ -110,7 +110,7 @@ refHistory.clear() // explicitly clear all the history

### History Flush Timing

From [Vue's documentation](https://v3.vuejs.org/guide/reactivity-computed-watchers.html#effect-flush-timing): Vue's reactivity system buffers invalidated effects and flush them asynchronously to avoid unnecessary duplicate invocation when there are many state mutations happening in the same "tick".
From [Vue's documentation](https://vuejs.org/guide/essentials/watchers.html#callback-flush-timing): Vue's reactivity system buffers invalidated effects and flush them asynchronously to avoid unnecessary duplicate invocation when there are many state mutations happening in the same "tick".

In the same way as `watch`, you can modify the flush timing using the `flush` option.

Expand Down
2 changes: 1 addition & 1 deletion packages/guide/config.md
Expand Up @@ -36,7 +36,7 @@ motionControl.resume()

### Reactive Timing

VueUse's functions follow Vue's reactivity system defaults for [flush timing](https://v3.vuejs.org/guide/reactivity-computed-watchers.html#effect-flush-timing) where possible.
VueUse's functions follow Vue's reactivity system defaults for [flush timing](https://vuejs.org/guide/essentials/watchers.html#callback-flush-timing) where possible.

For `watch`-like composables (e.g. `pausableWatch`, `whenever`, `useStorage`, `useRefHistory`) the default is `{ flush: 'pre' }`. Which means they will buffer invalidated effects and flush them asynchronously. This avoids unnecessary duplicate invocation when there are multiple state mutations happening in the same "tick".

Expand Down
2 changes: 1 addition & 1 deletion packages/shared/syncRefs/index.md
Expand Up @@ -51,7 +51,7 @@ export interface SyncRefOptions {
}
```

When setting `{ flush: 'pre' }`, the target reference will be updated at [the end of the current "tick"](https://v3.vuejs.org/guide/reactivity-computed-watchers.html#effect-flush-timing) before rendering starts.
When setting `{ flush: 'pre' }`, the target reference will be updated at [the end of the current "tick"](https://vuejs.org/guide/essentials/watchers.html#callback-flush-timing) before rendering starts.

```ts
import { syncRefs } from '@vueuse/core'
Expand Down

0 comments on commit 8cc3d35

Please sign in to comment.