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

80
Visualizações
Image Not Showing React Props

I have images saved in a folder in my React app but for some reason when I pass their location link as props it does not show in my card...

<div className={projectCardColor}>
   <img src={props.img} alt="No Image" />
   <h4>{props.text}</h4>
   {props.liveLink && <Button><a href={props.liveLink}>Live</a></Button>}
   <Button><a href={props.githubLink}>Github</a></Button>
</div>

Here is the file that I pass the props.

{
            id: 'a8',
            img: '../assets/images/project-images/test.png',
            text: 'Some Text',
            githubLink: 'some link'
},

If I change the image link to some online link it works properly but not for internal link. Any ideas? If I define this image link as a parameter inside the component file it works properly but passing it as props break it. How come it works like that?

about 4 years ago · Juan Pablo Isaza
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