T
TanStack2y ago
deep-jade

Suspense and Mutations

Hi! I think this is probably me misunderstanding things, but I just refactored our app to use Tanstack v5 because I wanted to start utilizing React's <Suspense>, and I'm trying to understand how it can (and if it should) be used with mutations. For example, we have a file upload that is being handled with a mutation. When the mutation is in progress/file is uploading, we want to show a loading indicator. Can <Suspense/> be used here somehow? Or, since this is a mutation, it needs to use conditional rendering with the isPending variable?
1 Reply
fascinating-indigo
fascinating-indigo2y ago
there's no suspense for mutations

Did you find this page helpful?