title: How to set OTP timer on button click in react JS?
body: <p><strong>Problem:-</strong> I have made a modal in which i am doing Mobile number verification. I want OTP timer to get started on clicking the <code>Send OTP</code> button but it is not happenning.</p>
  <p>I have used useeffect() to create timer but in that way, timer is starting to run on page load but i only want timer to get started on clicking the <code>Send OTP</code> button click. How can i do that?</p>
  <p>I am pasting the Code sandbox link for your reference. Please guide me.</p>
  <p>Code:- <a href="https://codesandbox.io/s/goofy-hawking-wd1ze9" rel="nofollow noreferrer">https://codesandbox.io/s/goofy-hawking-wd1ze9</a></p>