This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate此外,我添加了生命周期方法componentWillUpdate和componentDidUpdate,它们甚至都没有被调用。} }] output: {
我有一个组件,上面有一个控件,当我点击它时,setState就会被触发。我需要调用函数this.setScrollLeft (),在这个函数中,我设置了选定的节点(ref),在本例中是分裂位置。下面是我的实现,但我相信有更好的解决方案: import React from 'react';
class LeaderboardPlayerResult extends <