Fail to redirect from server action (Might be a bug)
Unanswered
Havana posted this in #help-forum
HavanaOP
I have created a Nextjs 14 with App Router and I created two paths
After that I created under
Can this potentially be a bug? Is it necessary to have a root layout on top of the two paths for this to work? Because when I tried it that way it seemed to have worked.
/[...slug] and /server-action with each their own layout, not-foundand page file. After that I created under
/server-action/page.tsx a client-side component with a form (using react-hook-form) and created a server action that simply redirects to /a-different-slug which should match /[...slug]. After I hit submit, the page reload and I stay on the same page. In the logs, I see GET /server-action 303 and then GET /server-action 200 Can this potentially be a bug? Is it necessary to have a root layout on top of the two paths for this to work? Because when I tried it that way it seemed to have worked.