IssueRaiser

calling `redirect()` inside a server component causes flashing UI

### Link to the code that reproduces this issue https://github.com/Fredkiss3/bug-next-redirect-flashing-ui ### To Reproduce 1. click on the link 2. you will see a blank page while the page is being redirected ### Current vs. Expected behavior You can see in the video below that for server actions it works as expected, the page don't flash while being redirected (this is the desired behavior), while for link it doesn't : https://github.com/vercel/next.js/assets/38298743/415037db-31a9-4cde-9b13-4f7c6eb99c3a ### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020 Binaries: Node: 18.17.1 npm: 9.6.7 Yarn: N/A pnpm: N/A Relevant Packages: next: 13.5.5 eslint-config-next: 13.4.6 react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 Next.js Config: output: N/A ``` ### Which area(s) are affected? (Select all that apply) App Router ### Additional context _No response_

Posted by Fredkiss3 on Oct 25, 2023, 10:23 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

ux (SaaS)

calling `redirect()` inside a server component causes flashing UI

Fredkiss3Oct 25, 2023, 10:23 PM

### Link to the code that reproduces this issue https://github.com/Fredkiss3/bug-next-redirect-flashing-ui ### To Reproduce 1. click on the link 2. you will see a blank page while the page is being redirected ### Current vs. Expected behavior You can see in the video below that for server actions it works as expected, the page don't flash while being redirected (this is the desired behavior), while for link it doesn't : https://github.com/vercel/next.js/assets/38298743/415037db-31a9-4cde-9b13-4f7c6eb99c3a ### Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020 Binaries: Node: 18.17.1 npm: 9.6.7 Yarn: N/A pnpm: N/A Relevant Packages: next: 13.5.5 eslint-config-next: 13.4.6 react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.5 Next.js Config: output: N/A ``` ### Which area(s) are affected? (Select all that apply) App Router ### Additional context _No response_

Comments (0)

No comments yet. Start the discussion.

Comment on this issue