title: How to pass input data from one class to another
body: <p>I'm trying to pass the data from one class to another and displayed it in main class i.e user write something in input field(Component A) and at the same time data or input value is display in another component(Component B) and both work is displayed by Component C. But I can't figure out what's wrong with my code. 
  Below is my dummy code but the actual code is the same as below.</p>
  
  <pre><code>class A extends React.Component {
      constructor(props) {
          super()
      }
      render() {
          return (
              &lt;input name="firstName" placeholder="Enter name" /&gt;
          )
      }
  }
  
  class B extends React.Component {
      constructor(props) {
          super(props)
      }
      render() {
          return (
              &lt;h1&gt; "Display data here from input of class A " &lt;/h1&gt;
          )
      }
  }
  
  class C extends React.Component {
      constructor(props) {
          super(props)
      }
      render() {
          return (
              &lt;div&gt;
                  &lt;A /&gt;
                  &lt;B /&gt;
              &lt;/div&gt;
          )
      }
  }
  
  ReactDOM.render(&lt;C /&gt;, document.getElementById("root"))
  </code></pre>