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

Chapter 2. JSX in Depth

In the first chapter, we built our first component using React. We saw how using JSX makes the development easy. In this chapter, we will pe deep into JSX.

JavaScript XML (JSX) is an XML syntax that constructs the markup in React components. React works without JSX, but using JSX makes it easy to read and write the React components as well as structure them just like any other HTML element.

In this chapter, we will cover following points:

  • Why JSX?
  • Transforming JSX into JavaScript
  • Specifying HTML tags and React components
  • Multiple components
  • Different types of JSX tags
  • Using JavaScript expressions inside JSX
  • Namespaced components
  • Spread attributes
  • CSS styles and JSX
  • JSX Gotchas

At the end of the chapter, we will get familiar with the JSX syntax, how it should be used with React, and best practices of using it. We will also study some of the corner cases that one can run into while using JSX.

主站蜘蛛池模板: 汾西县| 大石桥市| 浮梁县| 洛扎县| 左贡县| 台北市| 宜州市| 原阳县| 大同市| 东方市| 义马市| 商南县| 蓬溪县| 鄂尔多斯市| 容城县| 咸阳市| 浦东新区| 保山市| 吉安县| 姚安县| 西藏| 汝南县| 济阳县| 丰都县| 忻城县| 大埔县| 雅江县| 无棣县| 广水市| 龙川县| 沅江市| 措美县| 安阳市| 永仁县| 垫江县| 朔州市| 广昌县| 松原市| 甘谷县| 安宁市| 北宁市|