We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
useDebouncedRef
1 parent 9ce45f2 commit 782d6a0Copy full SHA for 782d6a0
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