摘要: React的ref有3种用法: 1. 字符串(已废弃)2. 回调函数3. React.createRef() 老规矩先上代码 新增pages/Ref.js文件 route/index.js修改如下 启动项目npm start,打开http://localhost:3000/#/refs 查看控制台打 阅读全文
posted @ 2019-04-16 20:45 要开心 阅读(1164) 评论(0) 推荐(0) 编辑