React报错:
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
原因:按钮事件调用方法错误
错误写法
<Button type="primary" onClick={this.showUpdateModal(record)} ghost>
正确写法
<Button type="primary" onClick={() => { this.showUpdateModal(record); }} ghost>
8765

被折叠的 条评论
为什么被折叠?



