class vs className This lesson will cover more advanced JSX. You’ll learn some powerful tricks and some common errors to avoid. Grammar in JSX is mostly the same as in HTML, but there are subtle differences to watch out for. The most frequent of these involves the word class. In HTML, it’s common to use class as an attribute name: <h1 class = "big" > Title </h1> In JSX, you can’t use the word class ! You have to use className instead: <h1 className = "big" > Title </h1> This is because JSX gets translated into JavaScript, and class is a reserved word in JavaScript. When JSX is rendered , JSX className attributes are automatically rendered as class attributes. Self-Closing Tags Another common JSX error involves self-closing tags . What’s a self-closing tag? Most HTML elements use two tags: an opening tag ( <div> ), and a closing tag ( </div> ). However, some HTML elements such as <img> and <input> u
Package of more pieces of information. Thank you.
ReplyDeleteTally Course in Madurai
Tally Training in Madurai
Tally Course in Coimbatore
Tally Training Coimbatore
Tally Classes in Coimbatore
Best Tally Classes in Coimbatore
Thanks for posting such an blog it is really very informative. And useful for the freshers Keep posting the updates.
ReplyDeletechocolatesanddreams
Guest posting sites
Thanks for this blog please keep updating the information.
ReplyDeleteIELTS Coaching in Chennai
IELTS Coaching centre in Chennai
German Classes in Chennai
TOEFL Coaching in Chennai
Japanese Classes in Chennai
spanish language in chennai
German classes in anna nagar
german classes in chennai anna nagar
Thanks for posting such an blog it is really very informative. And useful for the freshers Keep posting the updates.
ReplyDeleteAWS Training in Chennai
Blue Prism Training in Chennai
Angular JS Training in Chennai
Uipath Training in Chennai
This comment has been removed by a blog administrator.
ReplyDelete