title: Getting "Uncaught (in promise) TypeError: Failed to fetch' when using Formik
body: <p>I'm learning how to use Formik. I'm trying to hit my backend which works via Postman but I can't seem to fetch using Formik.</p>
  <p>This is my App.js code for onSubmit in :</p>
  <pre><code>            &lt;Formik
                initialValues={{
                  ...initialState,
                }}
                validationSchema={formValidation}
                onSubmit={values =&gt;
  
                  fetch('/api/client', {
                   method: 'POST',
                    headers: {
                  'Content-Type': 'application/json'
                   },
                  body: JSON.stringify(values),
                   }).then(res =&gt; res.json())}&gt;
  </code></pre>
  <p>This is my Button component code:</p>
  <pre><code>const ButtonWrapper = ({
    children,
    ...otherProps
  }) =&gt; {
    const { submitForm } = useFormikContext();
  
    const handleSubmit = () =&gt; {
      submitForm();
    };
  
    const configButton = {
      variant: 'contained',
      color: 'primary',
      fullWidth: true,
      onClick: handleSubmit
    };
  
    return (
      &lt;Button
        {...configButton}
      &gt;
        {children}
      &lt;/Button&gt;
    );
  };
  
  export default ButtonWrapper;
  </code></pre>
  <p>Unsure what I'm doing incorrectly</p>