未处理的拒绝(错误):操作必须是普通对象.使用自定义中间件进行异步操作.
我想在每个帖子中添加 comments .所以当运行fetch posts时,我想为所有post调用fetch comment API.
export function bindComments(postId) {
return API.fetchComments(postId).then(comments => {
return {
type: BIND_COMMENTS,
comments,
postId
}
})
}