From 7e59b379068b077e32f70935fe04cc014e3ad14e Mon Sep 17 00:00:00 2001 From: Yousef Date: Tue, 14 May 2024 13:45:09 +0300 Subject: [PATCH] Fix the order of the returns of useActionState --- src/content/reference/rsc/server-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index cdabf5ad1c2..06613cb7cf8 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -173,7 +173,7 @@ You can compose Server Actions with `useActionState` for the common case where y import {updateName} from './actions'; function UpdateName() { - const [submitAction, state, isPending] = useActionState(updateName, {error: null}); + const [state, submitAction, isPending] = useActionState(updateName, {error: null}); return (