Skip to content

Commit

Permalink
Fix the order of the returns of useActionState (#6864)
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefelgoharyx authored May 19, 2024
1 parent e7c52aa commit 9967ded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/reference/rsc/server-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<form action={submitAction}>
Expand Down

0 comments on commit 9967ded

Please sign in to comment.