We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
useDebouncedRef
1 parent 8efc211 commit c8e0781Copy full SHA for c8e0781
src/api/reactivity-advanced.md
@@ -94,7 +94,9 @@ Creates a customized ref with explicit control over its dependency tracking and
94
Creating a debounced ref that only updates the value after a certain timeout after the latest set call:
95
96
```js
97
- function useDebouncedRef(value, delay = 200) {
+ import { customRef } from 'vue'
98
+
99
+ export function useDebouncedRef(value, delay = 200) {
100
let timeout
101
return customRef((track, trigger) => {
102
return {
0 commit comments