You get a bonus - 1 coin for daily activity. Now you have 1 coin

Why does React use className over the class attribute?

Practice



class
is a keyword in JavaScript, and JSX is an extension of JavaScript. That is the main reason React uses
className
instead of
class
Pass a string as the
className prop
.
render () {  return < span  className = { ' menu navigation-menu ' } > { ' Menu ' } </ span > }

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Scripting client side JavaScript, jqvery, BackBone"

Terms: Scripting client side JavaScript, jqvery, BackBone