FE-Interview icon indicating copy to clipboard operation
FE-Interview copied to clipboard

Day330:为什么 React useState 要使用数组而不是对象?

Open Genzhen opened this issue 4 years ago • 1 comments

每日一题会在下午四点在交流群集中讨论,五点小程序中更新答案 欢迎大家在下方发表自己的优质见解

二维码加载失败可点击 小程序二维码

扫描下方二维码,收藏关注,及时获取答案以及详细解析,同时可解锁800+道前端面试题。

Genzhen avatar Jun 29 '21 04:06 Genzhen

官方在对比依赖的时候是采用for循环的方式,然后用is来对比依赖,用数组,而不是用对象应该是数组使用起来更方便一点吧

DaphnisLi avatar Feb 21 '23 12:02 DaphnisLi