Server action redirect issue
Unanswered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
I'm having issues with redirect from server action. Basically, I have a client-side form and I'm using useTransition, which fires server funtion and if I do redirect from there, it doesn't do anything.
Yes, I'm using try catch and I'm re-throwing the error.
I see in network tab, that POST request returning 303, with X-Action-Redirect header, but still, nothing happens, it just stays there.
I also see GET requests to that route, to where it should be redirected, in my dev server.
What might be the issue? Instead of re-throwing that NEXT_REDIRECT, I might throw myself from the window, this redirect is just driving me nuts in every project, at least once 😄
Yes, I'm using try catch and I'm re-throwing the error.
I see in network tab, that POST request returning 303, with X-Action-Redirect header, but still, nothing happens, it just stays there.
I also see GET requests to that route, to where it should be redirected, in my dev server.
What might be the issue? Instead of re-throwing that NEXT_REDIRECT, I might throw myself from the window, this redirect is just driving me nuts in every project, at least once 😄