如何强制更新一个Hooks组件 livaha 2021-09-05 4,742 阅读1分钟 const [updater,setUpdater] = useState(0); function forceUpdate(){ setUpdater(updater => updater +1); }