标签: reactjs
如何修复此错误:TypeError:this.state.article.map不是函数
CODE:
答案 0 :(得分:1)
您收到一个对象 - 一篇“文章”。您需要将其作为数组的元素:
this.setState({ article: [data] })