mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Fix the order of the returns of useActionState (#6864)
This commit is contained in:
committed by
GitHub
parent
e7c52aac0f
commit
9967ded394
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user