1import React from 'react';
2import logo from './logo.png'; // Tell webpack this JS file uses this image
3
4console.log(logo); // /logo.84287d09.png
5
6function Header() {
7 // Import result is the URL of your image
8 return <img src={logo} alt="Logo" />;
9}
10
11export default Header;
1//if you have images in src folder
2import shoe1 from './img/shoe_01.jpg'
3const Shoe = (e) => {
4 return (
5 <div className="shoe-container">
6 <img src={shoe1} alt=""/>
7 </div>
8 );
9}
10//if you have images in public folder:
11//will look in folder /public/img/shoe_01.jpg
12const Shoe = (e) => {
13 return (
14 <div className="shoe-container">
15 <img src="/img/shoe_01.jpg" alt=""/>
16 </div>
17 );
18}
19