You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### How do I build support for Server Actions? {/*how-do-i-build-support-for-server-actions*/}
16
+
#### Sunucu Eylemleri için nasıl destek oluşturabilirim? {/*how-do-i-build-support-for-server-actions*/}
17
17
18
-
While Server Actions in React 19 are stable and will not break between major versions, the underlying APIs used to implement Server Actions in a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x.
18
+
React 19'daki Sunucu Eylemleri kararlı ve büyük sürümler arasında kırılmayacak olsa da, bir React Sunucu Bileşenleri paketleyicisinde veya çatısında Sunucu Eylemlerini uygulamak için kullanılan temel API'ler semver'ı takip etmez ve React 19.x'teki küçük sürümler arasında kırılabilir.
19
19
20
-
To support Server Actions 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 Actions in the future.
20
+
Sunucu Eylemlerini bir paketleyici veya çerçeve olarak desteklemek için, belirli bir React sürümüne sabitlemenizi veya Canary sürümünü kullanmanızı öneririz. Gelecekte Sunucu Eylemlerini uygulamak için kullanılan API'leri stabilize etmek için paketleyiciler ve çerçevelerle çalışmaya devam edeceğiz.
21
21
22
22
</Note>
23
23
24
-
When a Server Action is defined with the `"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.
24
+
Bir Sunucu Eylemi `“use server”` direktifi tanımlandığında, çatınız otomatik olarak sunucu işlevine bir referans oluşturacak ve bu referansı İstemci Bileşenine aktaracaktır. Bu işlev istemcide çağrıldığında, React işlevi yürütmek için sunucuya bir istek gönderecek ve sonucu return edecektir.
25
25
26
-
Server Actions can be created in Server Components and passed as props to Client Components, or they can be imported and used in Client Components.
26
+
Sunucu Eylemleri, Sunucu Bileşenlerinde oluşturulabilir ve İstemci Bileşenlerine destek olarak aktarılabilir veya İstemci Bileşenlerinde içe aktarılabilir ve kullanılabilir
27
27
28
-
### Creating a Server Action from a Server Component {/*creating-a-server-action-from-a-server-component*/}
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:
48
+
React, `EmptyNote`Sunucu Bileşenini işlediğinde, `createNoteAction`fonksiyonuna bir referans oluşturacak ve bu referansı`Button`İstemci Bileşenine aktaracaktır. Butona tıklandığında, React, sağlanan referansla `createNoteAction`fonksiyonunu çalıştırmak için sunucuya bir istek gönderecektir:
@@ -73,7 +73,7 @@ export async function createNoteAction() {
73
73
74
74
```
75
75
76
-
When the bundler builds the `EmptyNote`Client Component, it will create a reference to the `createNoteAction`function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNoteAction`function using the reference provided:
76
+
Paketleyici `EmptyNote`İstemci Bileşenini oluşturduğunda, paketteki `createNoteAction`işlevine bir referans oluşturacaktır. Butona tıklandığında React, sağlanan referansı kullanarak `createNoteAction`fonksiyonunu çalıştırmak için sunucuya bir istek gönderecektir:
When the Form submission succeeds, React will automatically reset the form. You can add `useActionState` to access the pending state, last response, or to support progressive enhancement.
162
+
Form gönderimi başarılı olduğunda, React formu otomatik olarak sıfırlayacaktır. Pending state, son yanıta erişmek veya aşamalı geliştirmeyi desteklemek için `useActionState` ekleyebilirsiniz.
163
163
164
-
For more, see the docs for [Server Actions in Forms](/reference/rsc/use-server#server-actions-in-forms).
164
+
Daha fazla bilgi için [Formlarda Sunucu Eylemleri](/reference/rsc/use-server#server-actions-in-forms) dokümanlarına bakın.
165
165
166
-
### Server Actions with `useActionState` {/*server-actions-with-use-action-state*/}
166
+
### `UseActionState` ile Sunucu Eylemleri {/*server-actions-with-use-action-state*/}
167
167
168
-
You can compose Server Actions with `useActionState` for the common case where you just need access to the action pending state and last returned response:
168
+
Yalnızca pending state'ine ve son döndürülen yanıta erişmeniz gereken yaygın durumlar için Sunucu Eylemlerini `useActionState` ile oluşturabilirsiniz:
When using `useActionState`with Server Actions, React will also automatically replay form submissions entered before hydration finishes. This means users can interact with your app even before the app has hydrated.
187
+
Sunucu Eylemleri ile `useActionState`kullanıldığında, React ayrıca hidrasyon tamamlanmadan önce girilen form gönderimlerini otomatik olarak yeniden oynatacaktır. Bu, kullanıcıların uygulama hidratlanmadan önce bile uygulamanızla etkileşime girebileceği anlamına gelir.
188
188
189
-
For more, see the docs for [`useActionState`](/reference/react-dom/hooks/useFormState).
189
+
Daha fazlası için [`useActionState`](/reference/react-dom/hooks/useFormState) dokümanlarına bakın.
190
190
191
-
### Progressive enhancement with `useActionState` {/*progressive-enhancement-with-useactionstate*/}
191
+
### `UseActionState` ile aşamalı iyileştirme {/*progressive-enhancement-with-useactionstate*/}
192
192
193
-
Server Actions also support progressive enhancement with the third argument of `useActionState`.
193
+
Sunucu Eylemleri ayrıca `useActionState` üçüncü bağımsız değişkeni ile aşamalı geliştirmeyi de destekler.
When the <CodeStepstep={2}>permalink</CodeStep> is provided to `useActionState`, React will redirect to the provided URL if the form is submitted before the JavaScript bundle loads.
211
+
<CodeStepstep={2}>permalink</CodeStep> `useActionState` için sağlandığında, form JavaScript paketi yüklenmeden önce gönderilirse React sağlanan URL'ye yönlendirecektir.
212
212
213
-
For more, see the docs for [`useActionState`](/reference/react-dom/hooks/useFormState).
213
+
Daha fazlası için [`useActionState`](/reference/react-dom/hooks/useFormState) dokümanlarına bakın.
0 commit comments