title: How to update the Context value in a Provider from the Consumer?
body: <p><strong>MyContext.js</strong></p>
  <pre><code>import React from &quot;react&quot;;
  
  const MyContext = React.createContext('test');
  export default MyContext;
  </code></pre>
  <p>I created my context in a separated <code>js</code> file where I can access  my parent as well as my child component</p>
  <p><strong>Parent.js</strong></p>
  <pre><code>import MyContext from &quot;./MyContext.js&quot;;
  import Child from &quot;./Child.js&quot;;
  
  class Parent extends Component {
  
      constructor(props) {
        super(props);
        this.state = {
          Message: &quot;Welcome React&quot;,
          ReturnMessage:&quot;&quot;
        };
      }
      
      render() {
          return (
             &lt;MyContext.Provider value={{state: this.state}}&gt;      
                &lt;Child /&gt; 
             &lt;/MyContext.Provider&gt;
         )
      }
  }
  </code></pre>
  <p>So I created the parent component with a Provider context and calling child component in the provider tab</p>
  <p><strong>Child.js</strong></p>
  <pre><code>import MyContext from &quot;./MyContext.js&quot;;
  
  class Child extends Component {
  
      constructor(props) {
        super(props);
        this.state = {        
          ReturnMessage:&quot;&quot;
        };
      }
      
      ClearData(context){
          this.setState({
             ReturnMessage:e.target.value
          });
          context.state.ReturnMessage = ReturnMessage
      }
  
      render() {
          return (
             &lt;MyContext.Consumer&gt;                 
                {(context) =&gt; &lt;p&gt;{context.state.Message}&lt;/p&gt;}
                &lt;input onChange={this.ClearData(context)} /&gt;
             &lt;/MyContext.Consumer&gt;
         )
      }
  }
  </code></pre>
  <p>So in child by using the <code>Consumer</code>, I can display the data in child rendering part.</p>
  <p>I'm facing an issue when I want to update the state from the consumer.</p>
  <p>How to update provider state or manipulate state of provider?</p>