Why React uses className over class attribute?

Answer

class is a keyword in JavaScript, and JSX is an extension of JavaScript.
That's the principal reason why React uses className instead of class.
Pass a string as the className prop.

render() {
return <span className={'menu navigation-menu'}>{'Menu'}</span>
}

All react js Questions

Ask your interview questions on react-js

Write Your comment or Questions if you want the answers on react-js from react-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---