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

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
主站蜘蛛池模板: 祥云县| 正宁县| 贞丰县| 新化县| 志丹县| 辰溪县| 大足县| 甘泉县| 阿克| 安吉县| 孝感市| 钟山县| 冷水江市| 湘潭市| 兰考县| 柳江县| 德钦县| 鄄城县| 南召县| 乌拉特后旗| 东阳市| 湟中县| 文昌市| 新竹市| 洛隆县| 佳木斯市| 伊通| 仪陇县| 大悟县| 阿拉善右旗| 景东| 鹤壁市| 买车| 古田县| 礼泉县| 桂阳县| 佛教| 商水县| 蕲春县| 西安市| 海林市|