- ReactJS by Example:Building Modern Web Applications with React
- Vipul A M Prathamesh Sonpatki
- 164字
- 2021-07-09 19:36:58
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.
推薦閱讀
- Visual FoxPro程序設計教程(第3版)
- JavaScript修煉之道
- Learning C++ Functional Programming
- 網頁設計與制作教程(HTML+CSS+JavaScript)(第2版)
- Mastering Google App Engine
- ASP.NET 3.5程序設計與項目實踐
- Visual Basic程序設計(第三版)
- Machine Learning for OpenCV
- Python Machine Learning Cookbook
- R的極客理想:量化投資篇
- ANSYS FLUENT 16.0超級學習手冊
- 計算機程序的構造和解釋(JavaScript版)
- 信息學奧林匹克競賽初賽精講精練
- HTML 5+CSS 3+jQuery Mobile移動網站與APP開發實戰
- web2py Application Development Cookbook