- 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.
推薦閱讀
- 零起步玩轉(zhuǎn)掌控板與Mind+
- The Android Game Developer's Handbook
- 深入淺出Electron:原理、工程與實踐
- AIRAndroid應(yīng)用開發(fā)實戰(zhàn)
- Network Automation Cookbook
- Bootstrap Essentials
- 零基礎(chǔ)學(xué)Kotlin之Android項目開發(fā)實戰(zhàn)
- Android群英傳
- Red Hat Enterprise Linux Troubleshooting Guide
- 區(qū)塊鏈架構(gòu)之美:從比特幣、以太坊、超級賬本看區(qū)塊鏈架構(gòu)設(shè)計
- Building Apple Watch Projects
- Distributed Computing with Python
- Python編程基礎(chǔ)與數(shù)據(jù)分析
- Learning RSLogix 5000 Programming
- Go語言從入門到進階實戰(zhàn)(視頻教學(xué)版)