<分区>
我正在我的组件中进行一个简单的获取调用,它看起来像这样
var x = fetch(SOME_URL, SOME_POST_DATA)
.then((response) => response.json())
.then((responseJSON) => {return responseJSON});
console.log(x);
调用成功执行,但控制台打印了一个 promise 而不是数据。我在这里缺少什么?