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

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.

主站蜘蛛池模板: 江达县| 广汉市| 沿河| 余庆县| 海阳市| 堆龙德庆县| 兴山县| 平舆县| 安庆市| 高青县| 平乐县| 手机| 息烽县| 襄垣县| 尉氏县| 噶尔县| 呼伦贝尔市| 牟定县| 望谟县| 辉县市| 天全县| 新晃| 宁波市| 安福县| 福贡县| 三江| 天镇县| 法库县| 丹阳市| 扶沟县| 中牟县| 武城县| 全椒县| 土默特右旗| 长武县| 庆云县| 宁武县| 曲周县| 永修县| 临泉县| 三门县|