Skip to content

Commit 537bd05

Browse files
authored
to make examples consistent. (#6793)
1 parent 807001c commit 537bd05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/blog/2024/04/25/react-19.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ To make the common cases easier for Actions, we've added a new hook called `useA
153153

154154
```js
155155
const [error, submitAction, isPending] = useActionState(async (previousState, newName) => {
156-
const {error} = await updateName(newName);
157-
if (!error) {
156+
const error = await updateName(newName);
157+
if (error) {
158158
// You can return any result of the action.
159159
// Here, we return only the error.
160160
return error;

0 commit comments

Comments
 (0)