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

172
Vistas
I Want To Display The ImagesUrl's In The Array according To The Number of images the Array has, using Reactjs

I am using React Carousel from The dependency react-responsive-carousel to display the image the user has uploaded on firebase I query the images in an Array Like:

image: [imageUrl/0, imageUrl/1, imageUrl/2, imageUrl/3, imageUrl/4] // Maximum is 5
    //then display it like 
<Carousel 
         infiniteLoop
         showStatus={true}
         showIndicators={true}
         showThumbs={true}
     >
         <div>
         <img src={imagesUrl[0]} alt="title"/>  
         </div>   
         <div>
         <img src={imagesUrl[1]} alt="title"/> 
         </div>
         <div>
         <img src={imagesUrl[2]} alt="title"/> 
         </div>
         <div>
         <img src={imagesUrl[3]} alt="title"/> 
         </div>
         <div>
         <img src={imagesUrl[4]} alt="title" />
         </div>
     </Carousel>

It Works fine But when the user uploaded 3 images it will show 5 images the last 2 will be blank white images, is it possible to Map the Array in a way I only show what is in the array?

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

0

you can loop over the images and show them:

using map:

...
images.map((image) => {
    return <div>
        <img src={image} alt="title" />
    </div>
})
...
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