KELEN / blog-comment

0 stars 0 forks source link

为什么React.memo无法起作用? #49

Open KELEN opened 9 months ago

KELEN commented 9 months ago

https://www.kelen.cc/posts/react-memo-does-not-work

在写函数式组件的时候,为了避免无效的渲染,可以通过 React.memo 函数来实现,类似于 React.PureCompnent 的功能,对 props 进行浅比较