Keep a state that updates at most once per interval.
This is custom React hooks, you need to follow the Basic Rules when you use it.
The click count shows at most one update per second.
const useThrottledState = <T>(
initialValue: T,
wait: number,
) => [T, (value: T) => void]