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

111
Views
How to make Show/Hide in ReactJS

need help, I have a problem. I want to make it so that when one arrow(Top) disappears, another appears(down).

here is my code

return (
  <div>
    <Header />
    <FaChevronDown className='flachDown' onClick={(e) => {
      handleScrollDown();
      handleShow();
      if (!handleScrollUp) {
        { e.target.style.display = 'block' }
      } else {
        { e.target.style.display = 'none' }
      }
    }} />
    {isShown && (
      <FaChevronUp className='flachUp' onClick={(a) => {
        handleScrollUp();
        handleShow();
        if (!handleScrollDown) {
          { a.target.style.display = 'none' }
        } else {
          { a.target.style.display = 'block' }
        }
        
      }} />
    )}
    <Body />
  </div>
);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

create a state variable : import React ,{useState} from "react"; [visible,setVisible]=useState(false); change it depending on the event that you want

about 4 years ago · Juan Pablo Isaza Report
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!