buena-suerte
v1.0.14
Published
🤞 A small collection of convenient JavaScript utilities & helpers. Mostly for React/Next.js/Gatsby
Downloads
142
Maintainers
Readme
buena-suerte
🤞 A small collection of convenient JavaScript utilities & helpers. Mostly used for React/Next.js/Gatsby
Features
- 🤷 Dunno yet
Installation
npm i buena-suerte
Usage
import { useInterval } from 'buena-suerte'
const [count, setCount] = useState(0);
const [delay, setDelay] = useState(1000);
const [isRunning, toggleIsRunning] = useState(true);
useInterval(
() => {
setCount(count + 1);
},
isRunning ? delay : null
);
Functions
useInterval
Use Interval to be used in React projects