title: React js change child component's state from parent component
body: <p>I have two components:
  <strong>Parent Component</strong> from which I want to change child component's state:</p>
  
  <pre><code>class ParentComponent extends Component {
    toggleChildMenu() {
      ?????????
    }
    render() {
      return (
        &lt;div&gt;
          &lt;button onClick={toggleChildMenu.bind(this)}&gt;
            Toggle Menu from Parent
          &lt;/button&gt;
          &lt;ChildComponent /&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>And <strong>Child Component</strong>:</p>
  
  <pre><code>class ChildComponent extends Component {
    constructor(props) {
      super(props);
      this.state = {
        open: false;
      }
    }
  
    toggleMenu() {
      this.setState({
        open: !this.state.open
      });
    }
  
    render() {
      return (
        &lt;Drawer open={this.state.open}/&gt;
      );
    }
  }
  </code></pre>
  
  <p>I need to either change Child Component's <strong>open</strong> state from Parent Component, or call Child Component's <strong>toggleMenu()</strong> from Parent Component when Button in Parent Component is clicked?</p>