Javascript – How can I stop a timer without using useState and useEffect?
In a simple timer component, I want to start and stop it with buttons, but the interval does not stop with a simple clearInterval function. Is there something I am missing? import React, { useState } from 'react' export default…