0.1.0 • Published 4 years ago
@srfaytkn/react-native-background-timer v0.1.0
react-native-background-timer
Getting started
- Requires pod install
npm install @srfaytkn/react-native-background-timer --save
Usage
import * as BackgroundTimer from "@srfaytkn/react-native-background-timer";
Interval
const taskId = BackgroundTimer.setInterval(() => {
console.log("foo");
}, 1000);
BackgroundTimer.clearInterval(taskId);
Timeout
const taskId = BackgroundTimer.setTimeout(() => {
console.log("bar");
}, 1000);
BackgroundTimer.clearTimeout(taskId);
Contributors
Inspired by the @ocetnik/react-native-background-timer