title: When is it appropriate to use a constructor in REACT?
body: <p>I understand the concept of constructors in OOP languages like C++. However, I am not entirely sure when to use a constructor in REACT. I do understand that JavaScript is object oriented, but I am not sure what the constructor is actually 'constructing'.</p>
  
  <p>When rendering a child component, do you need a constructor in the child component? For example:</p>
  
  <pre><code>class App extends React.Component {
     constructor(props) {
        super(props);
        this.state = {
           items: [],
           error: null
        }
      }
      render () {
         return (
            &lt;React.Fragment&gt;
               &lt;ChildComponent data={this.state.items}&gt;&lt;/ChildComponent&gt;
            &lt;/React.Fragment&gt;
         )
      }
  }
  </code></pre>
  
  <p>I will keep the example short for the sake of brevity. But, why would do you need a constructor? And would you need a constructor in the child component for props?</p>
  
  <p>It is possible that my ES6 knowledge is not up to snuff.</p>