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

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.

主站蜘蛛池模板: 灯塔市| 开阳县| 西峡县| 阿坝| 界首市| 都匀市| 南澳县| 桃江县| 泽州县| 习水县| 江安县| 米林县| 邢台市| 文昌市| 齐河县| 沾益县| 刚察县| 西充县| 南华县| 城口县| 方正县| 汕尾市| 九龙坡区| 上蔡县| 靖江市| 云安县| 车险| 璧山县| 梅河口市| 乐陵市| 农安县| 潢川县| 邮箱| 鹤岗市| 肥乡县| 宁河县| 海盐县| 仁化县| 睢宁县| 威信县| 浮山县|