- 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.
- Visual C++程序設(shè)計(jì)教程
- JavaScript+DHTML語(yǔ)法與范例詳解詞典
- C#程序設(shè)計(jì)實(shí)訓(xùn)指導(dǎo)書
- 編寫整潔的Python代碼(第2版)
- 羅克韋爾ControlLogix系統(tǒng)應(yīng)用技術(shù)
- 精通軟件性能測(cè)試與LoadRunner實(shí)戰(zhàn)(第2版)
- 精通網(wǎng)絡(luò)視頻核心開發(fā)技術(shù)
- Python面向?qū)ο缶幊蹋簶?gòu)建游戲和GUI
- Protocol-Oriented Programming with Swift
- C語(yǔ)言程序設(shè)計(jì)
- Python機(jī)器學(xué)習(xí)算法: 原理、實(shí)現(xiàn)與案例
- C語(yǔ)言開發(fā)基礎(chǔ)教程(Dev-C++)(第2版)
- MySQL從入門到精通(軟件開發(fā)視頻大講堂)
- HTML5 WebSocket權(quán)威指南
- Android應(yīng)用開發(fā)攻略