Answers for "react img not showing"


react img not showing

import React from 'react';
import logo from './logo.png'; // Tell webpack this JS file uses this image

console.log(logo); // /logo.84287d09.png

function Header() {
  // Import result is the URL of your image
  return <img src={logo} alt="Logo" />;

export default Header;
Posted by: Guest on July-12-2021

images not displaying in react

<img src={process.env.PUBLIC_URL + "/images/dog.png"}
// process.env.PUBLIC_URL is the key here
Posted by: Guest on May-20-2021

Code answers related to "react img not showing"

Code answers related to "Javascript"

Browse Popular Code Answers by Language