ReactJS and images in public folder

后端 未结 7 1591
北恋
北恋 2020-11-30 01:15

Im new in ReactJS and I want to import images in a component. These images are inside of the public folder and I do not know how to access the folder from the react componen

7条回答
  •  独厮守ぢ
    2020-11-30 01:36

    You Could also use this.. it works assuming 'yourimage.jpg' is in your public folder.

    
    

提交回复
热议问题