useThrottledState

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.

General

The click count shows at most one update per second.

APIs

useThrottledState

const useThrottledState = <T>(
  initialValue: T,
  wait: number,
) => [T, (value: T) => void]
Edit this page on GitHub