- 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.
推薦閱讀
- HornetQ Messaging Developer’s Guide
- PyTorch Artificial Intelligence Fundamentals
- INSTANT MinGW Starter
- Visual C#通用范例開發(fā)金典
- MongoDB,Express,Angular,and Node.js Fundamentals
- 編程與類型系統(tǒng)
- Access 2010中文版項目教程
- Python 3.7從入門到精通(視頻教學(xué)版)
- Visual Basic 6.0程序設(shè)計實驗教程
- Processing創(chuàng)意編程指南
- JBoss:Developer's Guide
- Mastering Docker
- Flask Web開發(fā):基于Python的Web應(yīng)用開發(fā)實戰(zhàn)(第2版)
- JavaScript前端開發(fā)基礎(chǔ)教程
- 用Python動手學(xué)統(tǒng)計學(xué)