Day 53: React Course on Udemy

First Stateless Functional Component

// Variable ColorSpectrum is assigned to a function
// Component names are always capitalized
var ColorSpectrum = function() {
  return(
    <h1>Red, Orange, Yellow, Green, Blue, Indigo, Violet</h1>
  );
}

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