TanStackT
TanStack4y ago
13 replies
efficient-indigo

react query mutation and async await

Iv'e just seen this code in a PR
const handleSubmit = async (values) => {
    
    useApplication.mutate(values, {
      onSuccess: async () => {
        window.location.href = `.....`;
      },
    });
  };

surely the async keyword is unnecessary?
Was this page helpful?