{"version":"1.0","type":"rich","title":"Hook that debounces values by discarding inputs that take less than the specified milliseconds between changes.","description":"This example demonstrates a React hook that delays updates to a value until a specified number of milliseconds pass without new input, effectively debouncing rapid changes. The `useDebounce` function takes a `next` value and a delay `ms`, then uses `useState` to store the debounced result and `useEffect` with `setTimeout` to schedule the update, clearing the previous timer via `clearTimeout` when dependencies change. It returns the debounced value, enabling components to ignore frequent intermediate states, such as keystrokes or slider movements, until the user pauses. The code uses only React's core hooks, with no external libraries.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-9b71c2fd8cf5e5fa5b9ae5bd5f35def6?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}