Wrapping a login redirect into useMutation? #7983
Unanswered
codinginflow
asked this question in
Q&A
Replies: 1 comment 1 reply
-
do you have any errors with that approach? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use React Query's
useMutation
throughout my project because it provides convenient loading and error states and callbacks.I have one hook that handles the redirect to a third-party's auth page. It feels weird to wrap this into
useMutation
, probably because of the redirect. On the other hand, I need an error handler.Is this suited to be wrapped into
useMutation
?Beta Was this translation helpful? Give feedback.
All reactions