react-native-set-timer
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

react-native-set-timer

This library provides setTimeout and setInterval implementations that keep working even if the app is running in the background or the screen is locked.

Features

  • Clear and simple API

Install

yarn add react-native-set-timer

Usage

import Timer from "react-native-set-timer";

// Start a timer 
const intervalId = Timer.setInterval(() => console.log(""), 500);

// Cancel the timer 
Timer.clearInterval(intervalId);

// Start a timer t
const timeoutId = Timer.setTimeout(() => console.log("tic"), 500);

// Cancel the timer 
Timer.clearTimeout(timeoutId);

Package Sidebar

Install

npm i react-native-set-timer

Weekly Downloads

7

Version

1.0.2

License

MIT

Unpacked Size

444 kB

Total Files

48

Last publish

Collaborators

  • wangj