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
When using Next.js 16 with cacheComponents: true enabled in next.config, server action redirects using redirect() from next/navigation do not work. The redirect is not executed and the user remains on the current page.
'use server'import{actionClient}from"@/lib/safe-action";import{redirect}from"next/navigation";exportconstcreate=actionClient.action(async()=>{// Perform some actionredirect('/');});
When using Next.js 16 with
cacheComponents: trueenabled innext.config, server action redirects usingredirect()fromnext/navigationdo not work. The redirect is not executed and the user remains on the current page.Steps to Reproduce
cacheComponentsinnext.config:Expected Behavior
The redirect('/') call should navigate the user to the homepage after the server action completes.
Actual Behavior
The redirect does not occur. The user remains on the current page. The server action executes successfully, but the redirect is not triggered.