From f611d424019fb753d8fd8a75cfe339a50311beff Mon Sep 17 00:00:00 2001 From: utku Date: Thu, 21 Dec 2023 21:13:02 +0300 Subject: [PATCH 1/2] Update server.md --- docs/routes/api/server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/routes/api/server.md b/docs/routes/api/server.md index 6a8e28b07..182f11f9c 100644 --- a/docs/routes/api/server.md +++ b/docs/routes/api/server.md @@ -28,7 +28,7 @@ const logHello = async (message: string) => { ### Basic usage -To create a function that only runs on the server, pass a function as a parameter to `server$`. +To create a function that only runs on the server, insert `"use server" directive at the top of the function`. ```tsx twoslash {4-6} const logHello = async (message: string) => { From ca92576196ed4672c0580d98cb830bbd3db58f2f Mon Sep 17 00:00:00 2001 From: utku Date: Thu, 21 Dec 2023 21:14:13 +0300 Subject: [PATCH 2/2] Update server.md --- docs/routes/api/server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/routes/api/server.md b/docs/routes/api/server.md index 182f11f9c..608e9fcde 100644 --- a/docs/routes/api/server.md +++ b/docs/routes/api/server.md @@ -28,7 +28,7 @@ const logHello = async (message: string) => { ### Basic usage -To create a function that only runs on the server, insert `"use server" directive at the top of the function`. +To create a function that only runs on the server, insert `"use server"` directive at the top of the function. ```tsx twoslash {4-6} const logHello = async (message: string) => {