官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 拜泉县| 木里| 棋牌| 泽库县| 黎平县| 武胜县| 临江市| 沿河| 义马市| 贵溪市| 锡林郭勒盟| 乌拉特前旗| 静乐县| 石景山区| 田东县| 老河口市| 雅江县| 井冈山市| 织金县| 仙居县| 腾冲县| 延安市| 静乐县| 土默特右旗| 清新县| 甘泉县| 盘锦市| 射阳县| 金川县| 普兰县| 天祝| 迁安市| 武乡县| 临沧市| 陇川县| 库尔勒市| 含山县| 开化县| 北安市| 如东县| 江阴市|