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

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.

主站蜘蛛池模板: 丹棱县| 岳池县| 应用必备| 永寿县| 大庆市| 大连市| 抚顺市| 庆城县| 大悟县| 穆棱市| 金秀| 秦安县| 唐河县| 卢湾区| 桂林市| 盐城市| 长兴县| 东丽区| 英德市| 扶余县| 浪卡子县| 休宁县| 和政县| 宝山区| 郁南县| 灵寿县| 樟树市| 皮山县| 西丰县| 四川省| 瑞丽市| 天镇县| 肇州县| 牡丹江市| 当阳市| 乌鲁木齐市| 安远县| 湘阴县| 永福县| 黔江区| 肇庆市|