Html – Why is my setstate function causing other functions to malfunction in react.js?
const [lap, setLap] = useState([]); function start(){ if(!isStart){ starting = Date.now() - elapsed; isStart = true; timer = setInterval(update, 1000); console.log("timer is activated"); } } function stop(){ if(isStart){ isStart = false; clearInterval(timer); } } function reset(){ isStart = false; elapsed…