01 2021 档案

摘要:为什么要使用eslint、airbnb配置项? 因为: ESLint + Airbnb = Standard JS 步骤如下: 1:create-react-app cra-eslint-airbnb-sample --template typescript 2:cd cra-eslint-airb 阅读全文
posted @ 2021-01-17 16:29 老胡Andy 阅读(966) 评论(0) 推荐(0) 编辑
摘要:npx create-next-app sample01 npm install --save-dev typescript npm install --save-dev @types/react @types/react-dom @types/node //该命令会在项目根目录下新建tsconfi 阅读全文
posted @ 2021-01-17 11:02 老胡Andy 阅读(432) 评论(0) 推荐(1) 编辑
摘要:官网 https://docs.nestjs.com/controllers 参考 https://user-cube.medium.com/build-a-rest-api-from-scratch-using-nestjs-37bfcf81cc5f 注意点: 1:NestJS可以选择两种不同的H 阅读全文
posted @ 2021-01-09 23:06 老胡Andy 阅读(705) 评论(0) 推荐(0) 编辑
摘要:Performance中的LCP (Largest Contentful Paint),根据官方定义,就是页面中Size最大区域的渲染时间。 https://web.dev/lcp/ 所以,如果页面中有些区域(比如一个复杂的控件)渲染时间较久,一定要有比它更大的区域可以快速渲染。 比如以下例子: 三 阅读全文
posted @ 2021-01-04 18:25 老胡Andy 阅读(549) 评论(0) 推荐(0) 编辑
摘要:1: any 和 unknown类型的区别 any可以避开类型检查, 比如 let notSure: any = 'XXXXX'; notSure.Hello(); unknown在使用时必须进行类型断言: let x: unknown = 'xxxxxx'; console.log((x as s 阅读全文
posted @ 2021-01-01 10:10 老胡Andy 阅读(86) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示