npm.io
0.0.24 • Published 4 years ago

buena-suerte-test

Licence
MIT
Version
0.0.24
Deps
6
Size
16 kB
Vulns
0
Weekly
0

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