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

206
Vistas
React Typescript: Ant Design Alert not rendering

I have an Array messages and try to render different Alert if the Status is true but it dont render in the Browser. Console.log(message) has shown that the message is not empty.

return (
   <Space direction="vertical" >
      {messages.map(item => {
         item.status ?
            <Alert
               message={item.title}
               description={item.statusMessage}
               type="success"
               showIcon
            /> :
            <Alert
               message={item.title}
               description={item.statusMessage}
               type="error"
               showIcon
            />
      })}
   </Space>
);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Please bear in mind that this map() function will not return anything, because its content is in curly brackets {} and not parentheses (). You could also use return item.status ? ....

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