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

186
Views
Cómo hacer un encabezado en el que se pueda hacer clic en React

Estoy tratando de hacer que se pueda hacer clic en mi encabezado para navegar a la página de inicio, pero el código a continuación no funciona, estoy seguro de que debería haber una manera realmente fácil de hacerlo.

 const Header = () => { const navigate = useNavigate() return ( <div> <h1 className="font-weight-light display-1 text-center" onClick={navigate('/')}> The X app </h1> </div> ) }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

React ejecuta navigate('/') en cada procesamiento (y asigna los resultados a la propiedad onClick)

¿No debería ser onClick={() => navigate('/')} ?

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!