Skip to content

Commit 89d5cbd

Browse files
committed
translate server actions page
1 parent 93325ab commit 89d5cbd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/content/reference/rsc/server-actions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ Bir Sunucu Eylemi `“use server”` direktifi tanımlandığında, çatınız o
2525

2626
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
2727

28-
### Creating a Server Action from a Server Component {/*creating-a-server-action-from-a-server-component*/}
28+
### Sunucu Bileşeninden Sunucu Eylemi Oluşturma {/*creating-a-server-action-from-a-server-component*/}
2929

30-
Server Components can define Server Actions with the `"use server"` directive:
30+
Sunucu Bileşenleri `use server` yönergesi ile Sunucu Eylemleri tanımlayabilir:
3131

3232
```js [[2, 7, "'use server'"], [1, 5, "createNoteAction"], [1, 12, "createNoteAction"]]
33-
// Server Component
33+
// Sunucu Bileşeni
3434
import Button from './Button';
3535

3636
function EmptyNote () {
3737
async function createNoteAction() {
38-
// Server Action
38+
// Sunucu Eylemi
3939
'use server';
4040

4141
await db.notes.create();
@@ -45,19 +45,19 @@ function EmptyNote () {
4545
}
4646
```
4747

48-
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:
4949

5050
```js {5}
5151
"use client";
5252

5353
export default function Button({onClick}) {
5454
console.log(onClick);
5555
// {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNoteAction'}
56-
return <button onClick={() => onClick()}>Create Empty Note</button>
56+
return <button onClick={() => onClick()}>Boş Not Oluştur</button>
5757
}
5858
```
5959

60-
For more, see the docs for [`"use server"`](/reference/rsc/use-server).
60+
Daha fazlası için [`use server`](/reference/rsc/use-server) dokümanlarına bakın.
6161

6262

6363
### Importing Server Actions from Client Components {/*importing-server-actions-from-client-components*/}

0 commit comments

Comments
 (0)