0.0.2 • Published 6 years ago

react-native-declarative-timer v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

react-native-declarative-timer

Declaratively create timers in your components.

NPM Version NPM Downloads

Quick Access

  • Installation
  • Usage
  • Properties
  • Contributing

Installation

Install the module with:

npm install react-native-declarative-timer --save

Usage

In your code, simply require/import the module:

import Timer from 'react-native-declarative-timer';

//  ...

<Timer func={funcToExecute} interval={60} />

//  or wrap any single component (has no additional purpose, yet!)

<Timer func={funcToExecute} interval={60}>
    ...
</Timer>

Properties

PropDescriptionDefault
intervalInterval in seconds1
funcThe function to execute every interval secondsnull
Top

Contributing

Feel free to do pull requests if a certain feature you want is missing. We accept all PR's that are enhancements to the project.

Top