Load local images in React.js

后端 未结 10 2092
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 23:08

I have installed React using create-react-app. It installed fine, but I am trying to load an image in one of my components (Header.js, file path: <

10条回答
  •  情歌与酒
    2020-11-30 23:44

    If you want load image with a local relative URL as you are doing. React project has a default public folder. You should put your images folder inside. It will work.

提交回复
热议问题