title: React-native Formik setFieldValue
body: <p>Here is a simplified version of my code.</p>
  
  <p>Notice the <strong>setFieldValue_</strong> and <strong>this.setFieldValue_ = setFieldValue;</strong></p>
  
  <p>This code works fine, I'm able to get the output when submit button is clicked. </p>
  
  <p>I'm actually wondering if this is the right way to do it? If not, can you point me to the right direction? Also what is this method called? (assigning class variable to some function and use it within another function)</p>
  
  <pre><code>class MyComponent extends React.Component {
   setFieldValue_;
  
  someFunction() {
    this.setFieldValue_("name", value);
  }
  
  render() {
    return (
    &lt;Formik
        initialValues={{
          something: ""
        }}
        onSubmit={values =&gt; console.log(values)}
      &gt;
        {({
          setFieldValue,
        }) =&gt; {
          this.setFieldValue_ = setFieldValue;
          &lt;ThirdPartyCustomComponent onChange={this.someFunction} /&gt;
        }}
      &lt;/Formik&gt;
  }
  </code></pre>
  
  <p>}</p>