Simple Timer Hooks For React Native

A simple React Native hook used to create timers & counters in your app.

How to use it:

1. Install and import the useClock hook.

$ npm i react-native-timer-hooks
import React from "react";
import { StyleSheet, View, Text, Button } from 'react-native';
import { useClock } from 'react-native-timer-hooks';

2. Create a basic timer.

const Example = () => {
const [counter, start, pause, reset, isRunning] = useClock(0, 1000, false);
  return (
    <View style={styles.container}>
      <Text>Seconds: {counter}</Text>
        onPress={() => {
          isRunning ? pause() : start();
        title={isRunning ? 'Pause' : 'Start'}
      <Button onPress={() => reset()} title={'reset'} />


Simple Timer Hooks For React Native

Download Details:

Author: samuel3105

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website:

License: MIT

You Might Be Interested In:


Add Comment