title: How do you pass arguments to createAsyncThunk in redux toolkit?
body: <p>So i'm new to redux-toolkit and I want to do something really simple. I want to send some data on a POST request via this helper function. so I tried this</p>
  <pre><code>export const submitPaymentToServer = createAsyncThunk(
      'data/fetchAll',
      async ({ name, data }) =&gt; {
          return fetch('/payments', {
              method: 'POST',
              headers: { 'Content-Type': 'application/json' },
              body: JSON.stringify({
                  name,
                  data,
              }),
          })
              .then((res) =&gt; res.json())
              .then((res) =&gt; res)
      },
  )
  </code></pre>
  <p>but when I call it like so</p>
  <pre><code>    dispatch(
          submitPaymentToServer({
              name,
              data,
          }),
      )
  </code></pre>
  <p>typescript complains saying I don't have the right number of arguments. so how am I suppose to pass args to this function? or what is the way to do this with toolkit?</p>