Live Interactive Demo Model
Debounce vs Throttle Simulator
An interactive button you can spam click to visually see unthrottled vs debounced vs throttled execution.
Shooting Guns (Debouncing & Throttling)
Click to Fire!
Normal Gun
Shoots every time you click the button (immediate firing).
Bullets shot: 0
Throttling Gun
Shoots at most once every 1 second, even with rapid clicks.
Bullets shot: 0
Debouncing Gun
Shoots only after 1 second of inactivity after clicking stops.
Bullets shot: 0
Acceptance Criteria
Writing a custom useDebounce hook from scratch
Writing a custom useThrottle hook with timer refs
Why rate limiting is critical for search inputs and scroll handlers
Target APIs & Concepts
Custom HooksuseDebounceuseThrottleuseRef
Ready to code this yourself? Switch to the Candidate Code Studio to write your implementation in React 19 and run automated test evaluations!