You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m working on a scenario where I need to send multiple requests using a single mutation (useMutation). Each request should have a unique key (e.g., a custom identifier) to:
Track the state of individual requests (loading, success, error) independently.
Optionally cancel or manage specific requests programmatically.
Currently, useMutation does not seem to provide a built-in way to dynamically assign or associate custom keys with individual mutation instances. Is there a recommended way to handle such use cases?
If not directly supported, are there any best practices or patterns for managing dynamic mutation instances tied to unique identifiers?
Thanks for your insights, and I appreciate the amazing work you’re doing with TanStack Query!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m working on a scenario where I need to send multiple requests using a single mutation (useMutation). Each request should have a unique key (e.g., a custom identifier) to:
Track the state of individual requests (loading, success, error) independently.
Optionally cancel or manage specific requests programmatically.
Currently, useMutation does not seem to provide a built-in way to dynamically assign or associate custom keys with individual mutation instances. Is there a recommended way to handle such use cases?
If not directly supported, are there any best practices or patterns for managing dynamic mutation instances tied to unique identifiers?
Thanks for your insights, and I appreciate the amazing work you’re doing with TanStack Query!
Beta Was this translation helpful? Give feedback.
All reactions