react-confection
v1.0.2
Published
A collection of useful react stuff.
Downloads
5
Readme
react-confection
A collection of useful react stuff.
Install
npm install --save react-confection
Usage
import React, { Component } from 'react'
import {useInterval} from 'react-confection'
export default function() {
const [count, setCount] = useState(0)
useInterval(()=>{
setCount(count+1)
}, 1234)
return <>
<h2> useInterval </h2>
<p>
Just a perpetual timer that snuggles with React. This one updates a counter every 1,234ms.
<br />
Count: {count}
</p>
</>
}
License
MIT © fingerskier