【发布时间】:2020-04-20 14:52:46
【问题描述】:
在我的 ReactJs 应用程序中,我将 Firestore 与 redux 一起使用。每次我发出请求时,cloudstore 都会为 corse 策略抛出异常,这就是我从 chrome 浏览器中进行的。在 firefox 中,我有 corse 规则,并且请求会通过。 firestore.collection() 抛出异常
firestore
.collection('orders')
.add({
...order,
})
.then(() => {
dispatch({ type: 'CREATE_ORDER_SUCCESS', order });
})
.catch((err) => {
dispatch({ type: 'CREATE_ORDER_ERROR', err });
console.log(err);
});
【问题讨论】:
标签: reactjs firebase redux google-cloud-firestore