redirect to a page after form submssion #2102
Replies: 2 comments 1 reply
-
I'm also doing that and it works fine - can you maybe reproduce it in a codesandbox? I don't know any specifics why this shouldn't work |
Beta Was this translation helpful? Give feedback.
-
here is the calling code : // props.mutateFunc contains the mutation i get back from useMutation() async submissionFunction() } |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
HI All,
Use case. React-Query and react-router-dom...
I use useMuattion to submit a form,
Then on OnSuccess Handler i use history.push to redirect to a page.
I noticed that randomlly this fails and freezes the entire app.
I see the new location in the url bar bu the page doesn't get rendered and the app freezes.
I tried moving it to onSettled but that didnt work also.
I tried playing with it but got no where. Finally when i moved to location.replace generic function i get no bugs...
Im guessing this has to do with the promises from react-query...
Any guidness would be so much appreciated (am i doing anything wring)
Roy
Beta Was this translation helpful? Give feedback.
All reactions