摘要:
1. 推荐:使用class的实例方法 class Hello extends React.Component { handleClick = () => { this.setState({ ... }) } } 2. 箭头函数 <button onClick={() => { this.handle 阅读全文
posted @ 2021-08-14 20:56
键盘敲飞
阅读(27)
评论(0)
推荐(0)
摘要:
初始化项目 npx create-react-app my-app // 或 npm init react-app my-app // 或 yarn create react-app my-app 启动项目 cd my-app npm start // 或 yarn start 阅读全文
posted @ 2021-08-14 14:42
键盘敲飞
阅读(76)
评论(0)
推荐(0)

浙公网安备 33010602011771号