title: Only send values that have changed in formik onSubmit
body: <p>I have a small table of data that is pre-filled by an api call on page load. Each row in the table has a facility name and an <code>Enabled</code> value which comes from the api call. If <code>Enabled</code> == true the checkbox is shown as checked. </p>
  
  <p>I have a couple checkboxes that are grayed out because of a condition in which it cannot be changed at all so there's a readOnly attribute on the field.</p>
  
  <p>Onto my question, for brevity I condensed the list of facilities shown in the table, but in reality there could be <code>X</code> amount of facilities. In my <code>onSubmit</code> function I only want to send the facility name and <code>enabled</code> value if they have been selected/deselected instead of sending the entire list every time submit is pressed.</p>
  
  <p>Ideally I want the shape of the data sent to look like so:</p>
  
  <pre><code>{
      facilityName: "Backup Restore",
      enabled: true
  }
  </code></pre>
  
  <p>Now, I have been able to isolate JUST the <code>facilityName</code> and <code>enabled</code> value but I cannot figure out to only include the values that have been changed in the form. Like I said above, not every single facility name and enabled key/value should be sent every time submit is pressed just the ones that have been changed.</p>
  
  <p>This is what I currently have(and can be seen in the sandbox below) in my onSubmit function</p>
  
  <pre><code>         &lt;Formik
            enableReinitialize
            initialValues={{
              facilities: loggingFacilities
            }}
            onSubmit={async (values, { setSubmitting }) =&gt; {
  
              alert(JSON.stringify(values, null, 2));
              try {
  
                setLoggingFacilities(values.facilities);
                const valuesToSend = values.facilities.map(facility =&gt; {
                  return {
                    key: facility.facilityName,
                    value: facility.enabled
                  };
                });
                .....
  </code></pre>
  
  <p>I have a <a href="https://codesandbox.io/s/logging-table-l2rut" rel="noreferrer">codesandbox here</a></p>