1.0.4 • Published 5 years ago
onbeat v1.0.4
onBeat
Delay functions using promises to trigger on a beat.
set up
npm install onbeat
import Onbeat from 'onbeat'
const onBeat = new Onbeat(140, 8, 4)
usage
const getdata = async() => {
const data = await fetchSomeData()
onBeat.asyncStep(
4,
this.setState({ data: data })
)
}