title: Formik re-renders on react state change
body: <p>I'm using a custom component in formik field, and need to call a function upon text change inside function (in order to get all matching hints related to input)</p>
  <pre><code> &lt;Field
              id=&quot;assignees&quot;
              name=&quot;assignees&quot;
              component={({
                field, // { name, value, onChange, onBlur }
                form, // also values, setXXXX, handleXXXX, dirty, isValid, status, etc.
                ...props
              }) =&gt; {
                return (
                      &lt;input
                        key=&quot;assignees&quot;
                        className=&quot;input-fields&quot;
                        placeholder=&quot;Type names of assignees to start getting suggestions&quot;
                        onChange={(e) =&gt; {
                          form.setFieldValue(field.name, e.target.value);
                          getMatching(field.value);
                        }}
                        {...props}
                        {...form}
                        //   {...field}
                      /&gt;
      );
  }}
  /&gt;
  </code></pre>
  <p>The matching function that's being called in upper code is as below. It updates a state and that state is then being showed inside span in a formik field.</p>
  <pre><code>const getMatching = (keyword) =&gt; {
      for (const item of users) {
        if (keyword !== &quot;&quot; &amp;&amp; item.name.startsWith(keyword)) {
          setMatching(item.name);
          return;
        } else {
          setMatching(undefined);
        }
      }
    };
  </code></pre>
  <p><strong>Expected Behaviour</strong><br>
  Formik input doesn't lose focus and retains all the input texts I added upon state change or rerender</p>
  <p><strong>Actual Behaviour</strong><br>
  Input component loses focus and field is reset whenever a state is set by <code>getMatching</code> function</p>
  <p><strong>EDIT- CODE SANDBOX LINK</strong><br>
  <a href="https://codesandbox.io/s/wizardly-merkle-w191l" rel="nofollow noreferrer">https://codesandbox.io/s/wizardly-merkle-w191l</a></p>