idev0085 / react-boilerplate

0 stars 0 forks source link

Why React uses className over class attribute? #54

Open idev0085 opened 3 years ago

idev0085 commented 3 years ago

Explanation: The only reason behind the fact that it uses className over class is that the class is a reserved keyword in JavaScript and since we use JSX in React which itself is the extension of JavaScript, so we have to use className instead of class attribute.