How to notify a component that it needs to update
问题 As you can see in the code below, I check every 100ms (using setInterval ) whether a change has been made to convertProgress , and if so, the component needs to update. class TradingThing extends React.Component { componentDidMount() { const { convertProgress, setConvertProgress } = this.props.store; // mobx store this.interval = setInterval(() => { if(convertProgress < 100) { setConvertProgress(Math.min(convertProgress + 5, 100)); } , 100); } componentWillUnmount() { clearInterval(this