0
class Videos extends React.Component{
constructor(){
super();
videoslist:[];
}
_getVideo(skip,limit){
var self= this;
var sess=localStorage.getItem("sessionId");
$.ajax({
method:'GET',
url:'videos',
data:{'sessionId':sess,
'skip':skip,
'limit':limit},
success:function(res){
this.setState({videoslist:res.data})
}.bind(this)
});
}
componentWillMount(){
this._getVideo(0,10);
}
遗漏的类型错误:无法读取零遗漏的类型错误的特性“videoslist”:无法读取空如何得到这个反应Ajax响应,并设置状态
谢谢你的工作 –
那么有什么问题使这个作为接受的答案? –
maxx是正确的答案 –