From fcc3a06cc710e38483b41d5076b50864c5811d7e Mon Sep 17 00:00:00 2001
From: "translate-react-bot[bot]"
<251169733+translate-react-bot[bot]@users.noreply.github.com>
Date: Thu, 14 May 2026 15:36:01 +0000
Subject: [PATCH 1/2] =?UTF-8?q?docs:=20translate=20`use-server.md`=20to=20?=
=?UTF-8?q?=D0=A0=D1=83=D1=81=D1=81=D0=BA=D0=B8=D0=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/content/reference/rsc/use-server.md | 108 ++++++++++++------------
1 file changed, 53 insertions(+), 55 deletions(-)
diff --git a/src/content/reference/rsc/use-server.md b/src/content/reference/rsc/use-server.md
index 58b1f0ee15..c0a58dbf7a 100644
--- a/src/content/reference/rsc/use-server.md
+++ b/src/content/reference/rsc/use-server.md
@@ -2,17 +2,16 @@
title: "'use server'"
titleForTitleTag: "'use server' directive"
---
-
+```
-`'use server'` is for use with [using React Server Components](/reference/rsc/server-components).
+`'use server'` предназначен для использования с [React Server Components](/reference/rsc/server-components).
-
-`'use server'` marks server-side functions that can be called from client-side code.
+`'use server'` помечает серверные функции, которые можно вызывать из клиентского кода.
@@ -20,11 +19,11 @@ titleForTitleTag: "'use server' directive"
---
-## Reference {/*reference*/}
+## Ссылка {/*reference*/}
### `'use server'` {/*use-server*/}
-Add `'use server'` at the top of an async function body to mark the function as callable by the client. We call these functions [_Server Functions_](/reference/rsc/server-functions).
+Добавьте `'use server'` в начало тела асинхронной функции, чтобы пометить функцию как вызываемую клиентом. Мы называем эти функции [_Server Functions_](/reference/rsc/server-functions).
```js {2}
async function addToCart(data) {
@@ -33,78 +32,76 @@ async function addToCart(data) {
}
```
-When calling a Server Function on the client, it will make a network request to the server that includes a serialized copy of any arguments passed. If the Server Function returns a value, that value will be serialized and returned to the client.
+При вызове Server Function на клиенте будет выполнен сетевой запрос к серверу, который включает сериализованную копию любых переданных аргументов. Если Server Function возвращает значение, это значение будет сериализовано и возвращено клиенту.
-Instead of individually marking functions with `'use server'`, you can add the directive to the top of a file to mark all exports within that file as Server Functions that can be used anywhere, including imported in client code.
+Вместо того, чтобы по отдельности помечать функции с помощью `'use server'`, вы можете добавить директиву в начало файла, чтобы пометить все экспорты в этом файле как Server Functions, которые можно использовать где угодно, в том числе импортировать в клиентском коде.
-#### Caveats {/*caveats*/}
-* `'use server'` must be at the very beginning of their function or module; above any other code including imports (comments above directives are OK). They must be written with single or double quotes, not backticks.
-* `'use server'` can only be used in server-side files. The resulting Server Functions can be passed to Client Components through props. See supported [types for serialization](#serializable-parameters-and-return-values).
-* To import a Server Functions from [client code](/reference/rsc/use-client), the directive must be used on a module level.
-* Because the underlying network calls are always asynchronous, `'use server'` can only be used on async functions.
-* Always treat arguments to Server Functions as untrusted input and authorize any mutations. See [security considerations](#security).
-* Server Functions should be called in a [Transition](/reference/react/useTransition). Server Functions passed to [`