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

183
Vistas
Not Rendering Component From Iterated Array in JSX

I have a project variable which follows this structure:

[
    org_id_1: {
        project_id_1: {
            title: ...
        },
        project_id_2: {
            title: ...
        }
    },
    org_id_2: {
        ...
    }
]

In my JSX, I want to display a ProjectCard component for each extracted project. I successfully loop through this structure to each individual project, but the component does not render. My code:

<div className='flexbox...'>
    {
        projects && Object.keys(projects).map(organisationId => {
            const projectsArray = projects[organisationId]
            projectsArray.map(project => {
                return <ProjectCard key={project.id} project={project} />
            })
        })
    }
</div>

I know for sure that I'm iterating through the projects because when I console.log(project), or console.log(project.title) just before the return statement, I can see the correct values show up.

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

0

Try returning the outer map as the inner scope has a correct return but the outer one isn't returning anything

about 4 years ago · Juan Pablo Isaza Denunciar

0

You are suppose to put a return inside the .map()

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