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

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.

主站蜘蛛池模板: 交城县| 西乌珠穆沁旗| 沈丘县| 论坛| 车致| 新龙县| 洛川县| 年辖:市辖区| 清水河县| 石狮市| 仪征市| 昌黎县| 静海县| 西贡区| 庆城县| 长沙市| 北碚区| 闻喜县| 理塘县| 阿瓦提县| 盐边县| 右玉县| 治县。| 敦煌市| 平顺县| 丰都县| 咸阳市| 抚顺县| 镇远县| 高台县| 洛阳市| 读书| 保靖县| 陆良县| 三原县| 宜川县| 定边县| 乡宁县| 呼伦贝尔市| 广汉市| 博白县|