上一页 1 ··· 115 116 117 118 119 120 121 122 123 ··· 498 下一页
摘要: Step 4: ESLint We need to install ESLint tools for Typescript. yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser .eslintrc file: 阅读全文
posted @ 2022-08-29 19:27 Zhentiw 阅读(398) 评论(0) 推荐(0)
摘要: Step 3: Turn on "noImplicitAny" From previous steps, we allow implicit any: https://www.cnblogs.com/Answer1215/p/16634618.html Now, we need to turn on 阅读全文
posted @ 2022-08-29 18:49 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: 1. Compiling in "loose mode" Start with all tests passing Rename all .js to .ts, allowing implicit any Fix only things that are not type-checking, or 阅读全文
posted @ 2022-08-29 01:23 Zhentiw 阅读(78) 评论(0) 推荐(0)
摘要: Source: https://javascriptpatterns.vercel.app/patterns/performance-patterns/browser-hints Prefetch The `prefetch` browser hint can be used to fetch re 阅读全文
posted @ 2022-08-26 20:31 Zhentiw 阅读(54) 评论(0) 推荐(0)
摘要: Source: https://javascriptpatterns.vercel.app/patterns/performance-patterns/route-based-splitting If you're using react-router for navigation, you can 阅读全文
posted @ 2022-08-26 20:21 Zhentiw 阅读(32) 评论(0) 推荐(0)
摘要: Source: https://javascriptpatterns.vercel.app/patterns/performance-patterns/import-on-visibility One way to dynamically import components on interacti 阅读全文
posted @ 2022-08-26 20:19 Zhentiw 阅读(46) 评论(0) 推荐(0)
摘要: Source : https://javascriptpatterns.vercel.app/patterns/react-patterns/compound-pattern A compound compoennt usage looks like this: import React from 阅读全文
posted @ 2022-08-26 19:45 Zhentiw 阅读(34) 评论(0) 推荐(0)
摘要: Docs The name “SWR” is derived from stale-while-revalidate, a HTTP cache invalidation strategy popularized by HTTP RFC 5861. SWR is a strategy to firs 阅读全文
posted @ 2022-08-26 18:15 Zhentiw 阅读(52) 评论(0) 推荐(0)
摘要: Source: https://javascriptpatterns.vercel.app/patterns/design-patterns/prototype-pattern If you use factory pattern to create object: const createDog 阅读全文
posted @ 2022-08-26 18:09 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: In JavaScript, the factory pattern isn't much more than a function that returns an object without using the new keyword. ES6 arrow functions allow us 阅读全文
posted @ 2022-08-26 17:44 Zhentiw 阅读(38) 评论(0) 推荐(0)
上一页 1 ··· 115 116 117 118 119 120 121 122 123 ··· 498 下一页