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

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.

主站蜘蛛池模板: 阿荣旗| 兰西县| 巩义市| 汽车| 台州市| 利川市| 东阿县| 湖口县| 马鞍山市| 台北县| 永登县| 元朗区| 西安市| 恭城| 隆尧县| 临猗县| 乌海市| 岗巴县| 怀远县| 琼中| 南雄市| 滨州市| 象州县| 女性| 临澧县| 广饶县| 桦川县| 辛集市| 唐河县| 临沧市| 政和县| 师宗县| 日土县| 龙里县| 泉州市| 英德市| 云阳县| 城口县| 五莲县| 台中县| 湟中县|