Loading problem…
Build a useThrottle hook that limits how often a rapidly changing value updates consumers.
Implement only this hook function:
function useThrottle<T>(value: T, wait: number): TThe starter app already contains the full demo UI and interaction flow.
wait <= 0, behave like pass-through (no throttling)Raw increases immediately and faster than ThrottledThrottled eventually catches latest pending valuewait to 0 and verify both values track the same updates