摘要: 预先了解 setState 的两种传参方式 1、直接传入新值 setState(options); 列如: const [state, setState] = useState(0); setState(state + 1); 2、传入回调函数 setState(callBack); 例如: con 阅读全文
posted @ 2021-07-09 18:00 是明啊 阅读(25723) 评论(2) 推荐(3) 编辑