Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

331
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda