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

What is New in TypeScript 3

In its six years of existence, TypeScript has continued to move forward and mature nicely. Is TypeScript 3 a significant release for React developers? What exactly are the new features that we have to add to our toolkit in TypeScript 3? These questions will be answered in this chapter, starting with the tuple type and how it can now be successfully used with the rest and spread JavaScript syntax, which is very popular in the React community. We'll then move on to the new unknown type and how it can be used as an alternative to the any type. Further more, we'll break TypeScript projects up into smaller projects with the new project references in TypeScript. Finally, we'll go about defining default properties in a strongly-typed React component that has improved in TypeScript 3.

By the end of the chapter, we'll be ready to start learning how you can use TypeScript 3 to build frontends with React. In this chapter, we'll cover the following topics:

  • Tuples
  • The unknown type
  • Project references
  • Default JSX properties
主站蜘蛛池模板: 平顺县| 临猗县| 静乐县| 双辽市| 绥阳县| 玉林市| 大竹县| 浦北县| 深州市| 德令哈市| 杭锦旗| 苗栗县| 资阳市| 荆州市| 无为县| 临漳县| 凭祥市| 定结县| 沂水县| 交口县| 天等县| 唐海县| 五指山市| 靖远县| 邵阳市| 永胜县| 永善县| 视频| 偃师市| 山阳县| 浮山县| 化德县| 宽甸| 塔河县| 获嘉县| 济阳县| 安仁县| 江川县| 晋州市| 呼图壁县| 抚顺市|