Question

How to specify a CSS class for a React element?

#react

Answer

The attribute to specify a CSS class in React is not class, like in HTML, but className.

There are other differences in attributes between HTML and React.

Learn

Author

xavi

Reviews
Last
next

Students 1