From 0258969cf4c336fc9c2af7ec1ecfb9927651b36b Mon Sep 17 00:00:00 2001
From: "translate-react-bot[bot]"
<251169733+translate-react-bot[bot]@users.noreply.github.com>
Date: Wed, 4 Feb 2026 15:15:12 +0000
Subject: [PATCH 1/3] =?UTF-8?q?docs:=20translate=20`server-functions.md`?=
=?UTF-8?q?=20to=20=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/server-functions.md | 68 +++++++++----------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/content/reference/rsc/server-functions.md b/src/content/reference/rsc/server-functions.md
index 770f5a705e..52b72ff24b 100644
--- a/src/content/reference/rsc/server-functions.md
+++ b/src/content/reference/rsc/server-functions.md
@@ -4,15 +4,15 @@ title: Server Functions
-Server Functions are for use in [React Server Components](/reference/rsc/server-components).
+Server Functions предназначены для использования в [React Server Components](/reference/rsc/server-components).
-**Note:** Until September 2024, we referred to all Server Functions as "Server Actions". If a Server Function is passed to an action prop or called from inside an action then it is a Server Action, but not all Server Functions are Server Actions. The naming in this documentation has been updated to reflect that Server Functions can be used for multiple purposes.
+**Примечание:** До сентября 2024 года мы называли все Server Functions «Server Actions». Если Server Function передается в action prop или вызывается изнутри action, то это Server Action, но не все Server Functions являются Server Actions. Названия в этой документации были обновлены, чтобы отразить, что Server Functions могут использоваться для различных целей.
-Server Functions allow Client Components to call async functions executed on the server.
+Server Functions позволяют Client Components вызывать асинхронные функции, выполняющиеся на сервере.
@@ -20,23 +20,23 @@ Server Functions allow Client Components to call async functions executed on the
-#### How do I build support for Server Functions? {/*how-do-i-build-support-for-server-functions*/}
+#### Как мне реализовать поддержку Server Functions? {/*how-do-i-build-support-for-server-functions*/}
-While Server Functions in React 19 are stable and will not break between minor versions, the underlying APIs used to implement Server Functions in a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x.
+Хотя Server Functions в React 19 стабильны и не будут ломаться между минорными версиями, базовые API, используемые для реализации Server Functions в бандлере или фреймворке React Server Components, не следуют semver и могут ломаться между минорными версиями React 19.x.
-To support Server Functions as a bundler or framework, we recommend pinning to a specific React version, or using the Canary release. We will continue working with bundlers and frameworks to stabilize the APIs used to implement Server Functions in the future.
+Для поддержки Server Functions в качестве бандлера или фреймворка мы рекомендуем зафиксировать определенную версию React или использовать Canary release. Мы продолжим работать с бандлерами и фреймворками над стабилизацией API, используемых для реализации Server Functions в будущем.
-When a Server Function is defined with the [`"use server"`](/reference/rsc/use-server) directive, your framework will automatically create a reference to the server function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result.
+Когда Server Function определяется с директивой [`"use server"`](/reference/rsc/use-server), ваш фреймворк автоматически создаст ссылку на серверную функцию и передаст эту ссылку в Client Component. Когда эта функция вызывается на клиенте, React отправит запрос на сервер для выполнения функции и вернет результат.
-Server Functions can be created in Server Components and passed as props to Client Components, or they can be imported and used in Client Components.
+Server Functions могут быть созданы в Server Components и переданы в качестве пропсов в Client Components, либо они могут быть импортированы и использованы в Client Components.
-## Usage {/*usage*/}
+## Использование {/*usage*/}
-### Creating a Server Function from a Server Component {/*creating-a-server-function-from-a-server-component*/}
+### Создание Server Function из Server Component {/*creating-a-server-function-from-a-server-component*/}
-Server Components can define Server Functions with the `"use server"` directive:
+Server Components могут определять Server Functions с директивой `"use server"`:
```js [[2, 7, "'use server'"], [1, 5, "createNoteAction"], [1, 12, "createNoteAction"]]
// Server Component
@@ -54,7 +54,7 @@ function EmptyNote () {
}
```
-When React renders the `EmptyNote` Server Component, it will create a reference to the `createNoteAction` function, and pass that reference to the `Button` Client Component. When the button is clicked, React will send a request to the server to execute the `createNoteAction` function with the reference provided:
+Когда React рендерит `EmptyNote` Server Component, он создаст ссылку на функцию `createNoteAction` и передаст эту ссылку в `Button` Client Component. При нажатии на кнопку React отправит запрос на сервер для выполнения функции `createNoteAction` с предоставленной ссылкой:
```js {5}
"use client";
@@ -66,12 +66,12 @@ export default function Button({onClick}) {
}
```
-For more, see the docs for [`"use server"`](/reference/rsc/use-server).
+Подробнее см. в документации по [`"use server"`](/reference/rsc/use-server).
-### Importing Server Functions from Client Components {/*importing-server-functions-from-client-components*/}
+### Импорт Server Functions из Client Components {/*importing-server-functions-from-client-components*/}
-Client Components can import Server Functions from files that use the `"use server"` directive:
+Client Components могут импортировать Server Functions из файлов, использующих директиву `"use server"`:
```js [[1, 3, "createNote"]]
"use server";
@@ -82,7 +82,7 @@ export async function createNote() {
```
-When the bundler builds the `EmptyNote` Client Component, it will create a reference to the `createNote` function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNote` function using the reference provided:
+Когда бандлер собирает `EmptyNote` Client Component, он создаст ссылку на функцию `createNote` в бандле. При нажатии на `button` React отправит запрос на сервер для выполнения функции `createNote` с предоставленной ссылкой:
```js [[1, 2, "createNote"], [1, 5, "createNote"], [1, 7, "createNote"]]
"use client";
@@ -95,11 +95,11 @@ function EmptyNote() {
}
```
-For more, see the docs for [`"use server"`](/reference/rsc/use-server).
+Подробнее см. в документации по [`"use server"`](/reference/rsc/use-server).
-### Server Functions with Actions {/*server-functions-with-actions*/}
+### Server Functions с Actions {/*server-functions-with-actions*/}
-Server Functions can be called from Actions on the client:
+Server Functions могут быть вызваны из Actions на клиенте:
```js [[1, 3, "updateName"]]
"use server";
@@ -143,15 +143,15 @@ function UpdateName() {
}
```
-This allows you to access the `isPending` state of the Server Function by wrapping it in an Action on the client.
+Это позволяет получить доступ к состоянию `isPending` Server Function, обернув ее в Action на клиенте.
-For more, see the docs for [Calling a Server Function outside of `