摘要: 通常情况下,React 会有多余的 render。 1. 常用的场景一:子组件依赖父组件数据,当父组件数据更新时,会重新渲染子组件。 // index.tsx function Index() { const [count, setCount] = useState(0); const handle 阅读全文
posted @ 2022-03-11 13:42 shellon 阅读(85) 评论(0) 推荐(0) 编辑