title: Can you tell me why the second in incrementing in even numbers in the stopwatch?
body: <p>I was trying to create a stopwatch, when I run it, it's counting the seconds in even numbers like 0 - 2 - 4 - 6....... I don't understand why.</p>
  <p>I don't find any error in the code. if anyone can help, it would be helpful</p>
  <pre><code>
  export default function Stopwatch() {
      let [ispaused,setIspaused ] = useState(false);
      let [seconds, setSeconds] = useState (0);
  
      let secondsref = useRef(seconds)
      let ispausedRef = useRef(ispaused);
      let watch = useRef(0);
      
      let initTicker= ()=&gt;{
          ispausedRef.current = true
          setIspaused(true);
          
        }
        let stopTicker=()=&gt;{
          ispausedRef.current = false
          setIspaused(false)
          //setSecondsleft(secondsleftRef.current);
        }
        
        let resethndler = ()=&gt;{
          setIspaused(false)
          ispausedRef.current = false;
          secondsref.current=0;
          setSeconds(0);
          
        }
  
        let Tick = ()=&gt;{
          secondsref.current+=1;
          setSeconds(secondsref.current);
  }
  
   useEffect(()=&gt;{
      
  watch.current = setInterval(()=&gt;{
      if (!ispausedRef.current){
          return;
          }
      Tick();
  },1000)
   },[])     
  
  let percantage = ((seconds%60)/60)*100
  
    return (
      &lt;div&gt;
        &lt;div className='stopwatch'&gt;
            
            &lt;CircularProgressbar
            ssbar value={percantage} text={`0${parseInt(seconds/60)}`.slice(-2)+ &quot;:&quot; +`0${seconds%60}`.slice(-2)} /&gt;
            
            &lt;/div&gt;
  }
  </code></pre>