Skip to content

Commit f82b818

Browse files
candymask0712icyJoseph
authored andcommitted
docs: to indicate that redirect can be used in both server and client… (#82092)
<img width="591" height="132" alt="image" src="https://github.com/user-attachments/assets/9c9c64fe-4095-4127-a893-1c12426d9700" /> - When I first read the explanation, it felt as if `redirect` couldn’t be used in client components. - Also, when clicking the `Server Components` link, it leads to the `Server and Client Components` page. - To indicate that `redirect` can be used in both `server and client components`, rename the hyperlink text in the `redirect.mdx` file. --------- Co-authored-by: Joseph <[email protected]>
1 parent 9491a55 commit f82b818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/01-app/03-api-reference/04-functions/redirect.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ related:
66
- app/api-reference/functions/permanentRedirect
77
---
88

9-
The `redirect` function allows you to redirect the user to another URL. `redirect` can be used in [Server Components](/docs/app/getting-started/server-and-client-components), [Route Handlers](/docs/app/api-reference/file-conventions/route), and [Server Actions](/docs/app/getting-started/updating-data).
9+
The `redirect` function allows you to redirect the user to another URL. `redirect` can be used while rendering in [Server and Client Components](/docs/app/getting-started/server-and-client-components), [Route Handlers](/docs/app/api-reference/file-conventions/route), and [Server Actions](/docs/app/getting-started/updating-data).
1010

1111
When used in a [streaming context](/docs/app/getting-started/linking-and-navigating#streaming), this will insert a meta tag to emit the redirect on the client side. When used in a server action, it will serve a 303 HTTP redirect response to the caller. Otherwise, it will serve a 307 HTTP redirect response to the caller.
1212

0 commit comments

Comments
 (0)