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

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
主站蜘蛛池模板: 余姚市| 兰考县| 称多县| 吴堡县| 成安县| 宣化县| 河曲县| 宁武县| 独山县| 宝丰县| 恭城| 米易县| 镇江市| 永嘉县| 三台县| 阿拉善左旗| 山东省| 诸城市| 清水河县| 永登县| 济宁市| 米易县| 北票市| 镇雄县| 和林格尔县| 双桥区| 富源县| 手游| 常熟市| 陆川县| 丰台区| 陇南市| 西和县| 水富县| 崇义县| 弋阳县| 克拉玛依市| 漳平市| 万载县| 姜堰市| 贵南县|