Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
How to check which element is hovered using React 17.0.2

I am currently trying to make a webpage that displays multiple images, and when I hover on each image, they will display different text depending on the image. I was thinking of useState and useEffect, but I'm not entirely sure how to implement that. My current structure is that I have a list with an a tag and inside that i have an image.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You could probably use the built in onMouseEnter and onMouseLeave events and manage a state with an object containing an index of each image and its info through the events.

<img src={picture} onMouseEnter={() => //change the state} onMouseLeave={() => //return state back to default}></img>
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda