useThrottle
Limiting the rate of execution.
Usage
import React, { useState } from "react";
import useThrottle from 'funda-ui/Utils/useThrottle';
const App = () => {
const [count, setCount] = useState(0);
const handleClick = useThrottle(() => setCount(count + 1), 500, [count]);
return (
<div className="app">
<button onClick={handleClick}>click</button>
<p>click {count} time</p>
</div>
);
};