5 JSX
5 JSX
#React Notes
JSX
Introduction to JSX
▪ JSX is a technology that was introduced by React.
▪ JSX stands for JavaScript XML.
▪ Although React can work completely fine without using JSX, it’s an ideal
technology to work with components, so React benefits a lot from JSX.
▪ At first, you might think that using JSX is like mixing HTML and JavaScript
▪ https://reactjs.org/docs/introducing-jsx.html
▪ If Condition
▪ Multiline Comments
{/*
Multi
line
comment
*/}
▪ onclick - onClick
▪ tabindex - tabIndex
<h1 style={mycolors}>Home</h1>
render() {
var mycolors = {
backgroundColor:'#800080',
color:'white'
};
return (
<div>
{/* Internal Css Demo */}
<h1 style={mycolors}>Home</h1>
</div>
)
}
}
<React.Fragment>
<h2> child1 </h2>
<p> child2 </p>
.. ..... .... ...
</React.Fragment>
www.aptutorials.com
https://www.youtube.com/user/Akashtips
www.akashsir.com
Rating Us Now
Just Dial
https://www.justdial.com/Ahmedabad/Akash-Technolabs-Navrangpura-
Bus-Stop-Navrangpura/079PXX79-XX79-170615221520-S5C4_BZDET
Sulekha
https://www.sulekha.com/akash-technolabs-navrangpura-ahmedabad-
contact-address/ahmedabad
Connect With Me
# Social Info
Akash.padhiyar
Akashpadhiyar
Akash Padhiyar
#AkashSir Akash_padhiyar
+91 99786-21654
www.akashsir.com
www.akashtechnolabs.com #Akashpadhiyar
www.akashpadhiyar.com #aptutorials
www.aptutorials.com