[英]I am currently learning react and I ran into error. TypeError: Cannot read property 'image' of undefined
Your question description didn't have property 'image', But I guess you follow this can be sol:您的问题描述没有属性“图像”,但我想您可以遵循以下方法:
import image from './yourImageName.png'; // Tell webpack this JS file uses this image
.png can replace as.jpg... whatever you want. .png 可以替换 as.jpg... 任何你想要的。 It's your file extension.这是你的文件扩展名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.