What is ReactJs JSX?

JSX essentially allows us to write HTML in JavaScript! And also allows us to use JS within that by curly braces{}.
React developers urge you to use a mix of HTML and JavaScript known as JSX

JSX Creates Elements. We can use React.createElement like this:

var boldElement = React.createElement(‘b’, null, “Text (as a string)”);
This works fine as we had a small component, but if we had many nested components the syntax could get messy very quickly.

Using jsx we can achieve the same :
var boldElement = Text (as a string);

Uday Ogra

Connect with me at http://facebook.com/tendulkarogra and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *