Day 57: React Course on Udemy

Styling Class Components
You can link to an external stylesheet the same way we did with the Stateless Functional Component or you can do inline styling.

// A style object is created within the render method
class Circle extends React.Component {
  render() {
    var circleStyle={
      width: 100,
      height: 100,
      background: 'red',
      borderRadius: '50'
    }
    return(
      // Assign object to the style attribute of the JSX element
      <h1 style={circleStyle}>Circle</h1>
    );
  }
}

// Render our component to the DOM by passing variable Shapes within self-closing tags.
ReactDOM.render(
  <Circle />,
  document.getElementById("app")
);