title: react-native: How can I change parameters from a child component in react context?
body: <p>My root react-native is something like this:
  I try to work with CONTEXT API.</p>
  
  <pre><code>import { ContextProvider} from './ContextProvider';
  export default class App extends React.PureComponent {
    render() {
      return (
        &lt;ContextProvider&gt;
          &lt;Navigator /&gt;
        &lt;ContextProvider&gt;
      );
    }
  }
  </code></pre>
  
  <p>I create a simple context component like this:</p>
  
  <p>ContextProvider:</p>
  
  <pre><code>export const ParamContext = React.createContext({ param:0 });
  
  export class ContextProvider extends React.PureComponent {
    state = {
      param: 0,
    };
  
    render() {
      return (
        &lt;ContextProvider.Provider value={this.state}&gt;
          {this.props.children}
        &lt;/ContextProvider.Provider&gt;
      );
    }
  }
  </code></pre>
  
  <p>I can print the value of <code>param</code> in a children component with this code:</p>
  
  <pre><code>import { ParamContext } from './ContextProvider';
  export default class child1 extends React.PureComponent  {
     static contextType = ParamContext;
     render(){
         console.log(this.context.param)
     }
  }
  </code></pre>
  
  <p>it works. </p>
  
  <p>Now this is my question.</p>
  
  <p>How can I change <code>param</code> with a child component in my code?</p>