Fle*_*eck 13 javascript reactjs
这是我的一段代码,它可以正常工作(添加记录),但在添加后抛出错误:
未捕获的错误:违反不变:enqueueCallback(...):你叫
setProps
,replaceProps
,setState
,replaceState
,或forceUpdate
有回调是不可调用的.
handleSubmit: function(e) {
e.preventDefault();
return $.post('', {page: this.state},
function(data) {
this.props.handleNewPage(data);
return this.setState(this.getInitialState(), 'JSON');
}.bind(this)
);
}
Run Code Online (Sandbox Code Playgroud)
目前没有路线.有人可以帮我解决这个问题吗?
归档时间: |
|
查看次数: |
27007 次 |
最近记录: |