Uncaught (in promise) TypeError: Cannot read property '_currentElement' of null
来源:15-1 PC 端详情页面开发(上)

qq_慕丝8385167
2017-03-10
我在开发过程中遇到这个错,不知道这个错是什么,求各位大神解答
写回答
3回答
-
Parry
2017-03-10
可以贴一下代码吗?
00 -
qq_慕丝8385167
提问者
2017-03-10
articles.length 添加获取数组的长度就报错
042017-03-14 -
qq_慕丝8385167
提问者
2017-03-10
componentWillMount(){ let fetchOptions={ method:'GET' }; fetch('https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey=9695264a9ff24cb2947f5493598465f3',fetchOptions) .then(resposive =>resposive.json()) .then(json =>this.setState({news:json}));//json.sources[0] } render(){ const {articles} = this.state.news; console.log(articles.length); return( <div>result</div> ); }
032017-03-10
相似问题