码迷,mamicode.com
首页 > Web开发 > 详细

react踩坑记录——使用fetch获取json数据报错

时间:2017-09-12 18:35:05      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:size   数据   color   技术   etc   blog   html   span   json   

 

技术分享

报错: 

 技术分享

原因其实是list.json文件路径错误,该文件路径是相对于index.html的,而不是App.js或者index.js。

 

react踩坑记录——使用fetch获取json数据报错

标签:size   数据   color   技术   etc   blog   html   span   json   

原文地址:http://www.cnblogs.com/LLLLily/p/7511453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!