学习reactjs的tutorial是看到function(){this.XX }.bind(this);不是很理解。补充: bind的作用我懂,在这里的写法的目的不太了解$.ajax({ url: this.props.url, dataType: 'json', cache: false, success: function(data) { this.setState({data: data}); }.bind(this), error: function(xhr, status, err) { console.error(this.props.url, status, err.toString()); }.bind(this) });
添加回答
举报
0/150
提交
取消