摘要: 创建react项目 npx create-react-app my-app cd my-app npm start setState是异步的。 想要实现同步执行的效果,需要对其传参数为函数。 state和props的区别: 首先两者都是js对象,都是用来保存信息的,这些信息可以控制组件的渲染和输出, 阅读全文
posted @ 2022-01-17 10:38 阿兰儿 阅读(36) 评论(0) 推荐(0) 编辑