Fix the order of the returns of useActionState (#6864)

This commit is contained in:
Yousef M. El-Gohary
2024-05-19 05:36:13 +03:00
committed by GitHub
parent e7c52aac0f
commit 9967ded394

View File

@@ -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}>