vercel / vercel/next.js

Docs: `redirect` docs are outdated in code

Open
#83,099 2 comments 0 reactions 1 assignee View on GitHub

@icyJoseph is already working on this.

Since Aug 27, 2025.

Improvement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.