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

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.

主站蜘蛛池模板: 临澧县| 舒兰市| 永靖县| 阳谷县| 桂东县| 河池市| 珠海市| 会泽县| 合江县| 芜湖县| 曲阜市| 阳泉市| 凤翔县| 洛宁县| 杭锦旗| 兴文县| 余江县| 古交市| 来凤县| 郸城县| 阿图什市| 嘉禾县| 嵩明县| 临澧县| 威宁| 新蔡县| 云阳县| 新乐市| 来安县| 乌恰县| 彭泽县| 怀集县| 丁青县| 虎林市| 汤原县| 同江市| 龙游县| 舟山市| 安阳市| 垦利县| 龙里县|