- React Design Patterns and Best Practices(Second Edition)
- Carlos Santana Roldán
- 76字
- 2021-06-24 15:43:38
Attributes
We must always keep in mind that JSX is not a standard language, and that it gets transpiled into JavaScript. Because of this, some attributes cannot be used.
For example, instead of class we have to use className, and instead of for we have to use htmlFor, as follows:
<label className="awesome-label" htmlFor="name" />
The reason for this is that class and for are reserved words in JavaScript.
推薦閱讀
- 黑客攻防實(shí)戰(zhàn)技術(shù)完全手冊:掃描、嗅探、入侵與防御
- EJB 3.1從入門到精通
- Cisco OSPF命令與配置手冊
- 物聯(lián)網(wǎng)智慧安監(jiān)技術(shù)
- Mastering Machine Learning for Penetration Testing
- Hands-On Chatbots and Conversational UI Development
- TCP/IP入門經(jīng)典(第5版)
- 物聯(lián)網(wǎng)信息安全
- Getting Started with WebRTC
- Yii Application Development Cookbook(Second Edition)
- Bonita Open Solution 5.x Essentials
- 網(wǎng)絡(luò)安全應(yīng)急響應(yīng)技術(shù)實(shí)戰(zhàn)指南
- 工業(yè)互聯(lián)網(wǎng)創(chuàng)新實(shí)踐
- 網(wǎng)絡(luò)分析技術(shù)揭秘:原理、實(shí)踐與WinPcap深入解析
- 賽博空間簡史