【发布时间】:2018-10-12 00:39:49
【问题描述】:
我只对 javascript 的基本知识做出反应,我正在我的服务器中进行处理 mysql 的查询并且连接很好,但返回是我遇到问题的地方,它假设返回一个带有查询的 JSON但我发现错误 typeError _ref is undefined here is the function where I connect to my API
callDB(){
fetch('http://localhost:4000/lista')
.then((response)=>{
response.json()
})
.then(({data})=>{
console.log(data);
})
.catch((err)=>{console.log(err);});
}
在数据部分是它没有任何想法的地方?先谢谢
【问题讨论】:
标签: javascript mysql node.js reactjs