Docs: `redirect` docs are outdated in code
@icyJoseph is already working on this.
Since Aug 27, 2025.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.5k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
What is the documentation issue?
redirect function docs on website mention that it can be used almost everywhere:
Server and Client Components, Route Handlers, and Server Actions.
while documentation in the comment above the function in the code says:
It can be used in Server Components, Route Handlers, and Server Actions.
Notably, Client components are not mentioned in the code.
I checked it, and it does work in client components, the website is correct. I just would like to see the code docs updated. Thanks!
(same might apply to other functions in the file)
Is there any context that might help us understand?
not really
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/functions/redirect
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.