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

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.

主站蜘蛛池模板: 吴川市| 沈阳市| 偃师市| 龙里县| 临夏市| 时尚| 南和县| 黎城县| 密山市| 蒙城县| 六安市| 安远县| 旌德县| 长子县| 丰县| 托克托县| 塔河县| 海阳市| 左云县| 万盛区| 电白县| 东丰县| 南涧| 黔东| 三明市| 房山区| 马公市| 丰顺县| 晋州市| 巫山县| 杂多县| 五台县| 什邡市| 枣庄市| 灵宝市| 宜城市| 新竹县| 公安县| 行唐县| 岳普湖县| 勃利县|