- Learn React with TypeScript 3
- Carl Rippon
- 212字
- 2021-06-10 19:16:45
Summary
Using the rest and spread syntax is very common nowadays, particularly when building React apps. We've seen how TypeScript 3, with the enhancement of tuples, allows us to use rest and spread in a strongly-typed fashion.
We've also seen how we can use the unknown type to reduce our use of the any type. The unknown type does require us to write more code, but it also allows us to create a more strongly-typed, more maintainable code base.
TypeScript has always made working with large code bases easier. With the introduction of project references, we can now split our solution into smaller projects more easily. This approach makes large solutions even more maintainable and flexible, and also yields faster build times with the new --build flag.
We briefly went through how using defaultprops in a React component has improved. We'll be using this frequently as we start to learn how to build strongly-typed React components in subsequent chapters.
So, now that we are starting to get comfortable with TypeScript, in the next chapter, we'll get started with React. We'll start by learning how to create a React and TypeScript project, and then move on to how to create React and TypeScript components.
- 計(jì)算思維與算法入門
- SQL Server 2012數(shù)據(jù)庫(kù)技術(shù)及應(yīng)用(微課版·第5版)
- C/C++常用算法手冊(cè)(第3版)
- Full-Stack React Projects
- Quarkus實(shí)踐指南:構(gòu)建新一代的Kubernetes原生Java微服務(wù)
- Java性能權(quán)威指南(第2版)
- Scientific Computing with Scala
- 碼上行動(dòng):用ChatGPT學(xué)會(huì)Python編程
- ASP.NET Core 2 Fundamentals
- Python自然語(yǔ)言理解:自然語(yǔ)言理解系統(tǒng)開發(fā)與應(yīng)用實(shí)戰(zhàn)
- 寫給大家看的Midjourney設(shè)計(jì)書
- 貫通Tomcat開發(fā)
- Getting Started with JUCE
- Java服務(wù)端研發(fā)知識(shí)圖譜
- 大象:Thinking in UML(第二版)