You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-timer-hook

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-timer-hook - npm Package Compare versions

Comparing version

to
1.0.4

6

dist/index.js

@@ -36,3 +36,3 @@ import { useState, useEffect, useRef } from 'react';

setHours(prevHours => {
if (prevHours === 24) {
if (prevHours === 23) {
addDay();

@@ -75,3 +75,3 @@ return 0;

function clearTimer() {
function resetTimer() {
if (intervalRef.current) {

@@ -109,3 +109,3 @@ clearInterval(intervalRef.current);

return { seconds, minutes, hours, days, startTimer, stopTimer, clearTimer };
return { seconds, minutes, hours, days, startTimer, stopTimer, resetTimer };
}
{
"name": "react-timer-hook",
"version": "1.0.3",
"version": "1.0.4",
"description": "React timer hook is a custom react hook built to handle timers and count down logic in your react component.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -24,4 +24,2 @@ ## react-timer-hook

export default function App() {
const now = new Date()
const after10Days = now.setDate(now.getDate() + 10);
const {

@@ -28,0 +26,0 @@ seconds,