未处理的拒绝(错误):操作必须是普通对象。将自定义中间件用于异步操作。
我想在每个帖子中添加评论。因此,当运行获取帖子时,我想为所有帖子调用获取评论 API。
export function bindComments(postId) {
return API.fetchComments(postId).then(comments => {
return {
type: BIND_COMMENTS,
comments,
postId
}
})
}