Hi guys, new here.
React won't load my images. I have tried countless resources and stack overflow. What is going on?
Hope this image helps.
I was getting an error from Nam saying that ESlint. That my 'images' like 'GitHub' is an unused Var which you can see it is being used in my code
Top comments (2)
You've got your braces in the wrong place. The JSX syntax is
<Component prop={<expression>} ... />
, so in your case<img src={Github} ... />
. Alternatively, you can use template strings:<img src=`${Github}` ... />
, though I would still recommend having the block braces around the expression in general:
<img src={`${Github}`} ... />
You might also want to use the #help Tag in the future, that highlights your post a bit. :)
yeah this works now! Thank you!