class and id in react 1

class and id in react

To specify a CSS class, use the **className** attribute. This applies to all regular DOM and SVG elements like 

Here is what the above code is Doing:
1. We’re creating a new React element.
2. We’re giving that element a type of ‘div’.
3. We’re giving that element a property of className and setting it equal to ‘Button’.
4. We’re rendering that element to the DOM using ReactDOM.render().

Similar Posts