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

143
Vistas
Implementing an individual voting counter in each card

I'm currently working on a React project where I display cards with informations from an array of Objects, so that their content is dynamic. Now I would like to implement a like and a dislike counter on each card to vote the articles.

My problem is, how to fix this, so that when I click on (like), that it just ads 1 to that specific card and not in all of them. Because I'm mapping through the data array.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Look into using the .map method in your JSX. It allows you to iterate through multiple values and you can set your methods to individually mapped elements. Make sure to include a key in the element as well.

Further info: https://reactjs.org/docs/lists-and-keys.html

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