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

333
Vistas
When using Map, CSS does not get applied

The text I want to get rendered is rendered, but css is not applied. The css works perfectly when used on a item that is not mapped. On the app render method, the css gets applied, but on the message rendered, the CSS does not get applied for some reason.

I suspect that this is because of some technical issues to do with the list

const boyDivStyle = {
  backgroundColor: "blue",
  borderRadius: "25px",
  padding: "20px",
  width: 1*20 + "px",
}

class App extends Component {

  
  render() {
    return(
      <>
        <p style = {boyDivStyle}>random</p> 
        <AddHTMLTag/>
        
      </>
    )
  }
}

class MessageRenderer extends React.Component {
  render() {

    return(
      <>

        {this.state.listOfMessages.map(Message => (
          <p style = {boyDivStyle}>
             {Message}
          </p>
        ))}
      </>
    )
  }
}

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

0

const boyDivStyle = {
  backgroundColor: "blue",
  borderRadius: "25px",
  padding: "20px",
  width: 1*20 + "px",
}

class App extends Component {

  
  render() {
    return(
      <>
        <p style = {boyDivStyle}>random</p> 
        <AddHTMLTag/>
        
      </>
    )
  }
}

class MessageRenderer extends React.Component {
  render() {

    return(
      <>
        {this.state.listOfMessages.map((Message) => {
                return (<p style = {boyDivStyle}>{Message}</p>)
        }
        )}
      </>
    )
  }

}
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