会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
MingDao
博客园
首页
新随笔
新文章
联系
订阅
管理
2022年7月26日
实现自定义react hooks
摘要: 1:实现简版的 useState 每次调用顺序索引必须一样返回初始状态变量,和更改状态方法调用更改状态方法,更新状态并重新渲染let lastStates = []let index;function useState(initValue) { let state = lastStates[inde
阅读全文
posted @ 2022-07-26 09:51 码农-编程小子
阅读(96)
评论(0)
推荐(0)
编辑