Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
onClick event with touch screen: react

In my React app , I have a div with onClick event for collapsing sidebar, it is working fine, but on touch screens it is triggering event for only double tap , How can I disable that functionality ?

When I touch once on div , first it is setting isActive state true and right after that false

<div onClick={(e) => handleSideBar} className='dashboard-arrow-dark dashboard-arrow d-flex align-items-center justify-content-center'>
    {isActive ? <ArrowRightIcon /> : <ArrowLeftIcon/>}
</div>
  // collapse side bar
  const handleSideBar = (e) => {
    e.preventDefault()
    setIsActive(!isActive)
  }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!