我在 Codesandbox 上的 React 应用程序中有以下 fetch 调用: https ://codesandbox.io/s/react-fetch-example-for-so-vxxie
如果我激活任何一条线
.then(console.log(data))
或者
loadOptions={this.state.data}
我得到: 引发了跨域错误。React 无法访问开发中的实际错误对象。有关更多信息,请参阅 https://fb.me/react-crossorigin-error。
为什么以及如何解决这个问题?
(请注意我在 fb.me 前面添加了一个空格,以便在 StackOverflow 上通过验证)