---
title: "Discussion on \"Timer component decreases time by every one second.\" | Hashnode"
description: "Discussion on \"Timer component decreases time by every one second.\". import { useEffect, useState } from \"react\";\nimport \"./styles.css\";\nexport default function App() {\n  const [seconds, setSeconds] = useState(60); // Initial value is set to 60 seconds\n  useEffect(() => {\n    const timerId = setInterval(() => {\n      ..."
url: "https://hashnode.com/posts/timer-component-decreases-time-by-every-one-second/656e9eab9c1ecec12f811451"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Timer component decreases time by every one second.](https://reactonme.hashnode.dev/timer-component-decreases-time-by-every-one-second?utm_source=hashnode&utm_medium=feed)

import { useEffect, useState } from "react"; import "./styles.css"; export default function App() { const \[seconds, setSeconds\] = useState(60); // Initial value is set to 60 seconds useEffect(() => { const timerId = setInterval(() => { ...

Dec 5, 2023 · 1 min read · reactonme.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#time](https://hashnode.com/tag/time)

## Written by

[Murali Chowhan](https://hashnode.com/@Chowhan)

@Chowhan · Hyderabad

  
[View profile](https://hashnode.com/@Chowhan)

Senior Software Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
