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
We use Sonner together with React Query. Our queryClient automatically shows an error toast when a request fails (and some other cond. are met). When making mutations, we use toast.promise to show the loading and success states β since errors are handled elsewhere, we don't even bother.
π
We use Sonner together with React Query. Our
queryClient
automatically shows an error toast when a request fails (and some other cond. are met). When making mutations, we usetoast.promise
to show theloading
andsuccess
states β since errors are handled elsewhere, we don't even bother.What I'm proposing is changing
PromiseData
To the following:
This would not only make
error
optional, but all the other properties too.I'm open to make a PR if needed. Thank you!
The text was updated successfully, but these errors were encountered: