diff --git a/src/content/blog/2024/04/25/react-19.md b/src/content/blog/2024/04/25/react-19.md index 21784ca2135..2a79ab7e3b1 100644 --- a/src/content/blog/2024/04/25/react-19.md +++ b/src/content/blog/2024/04/25/react-19.md @@ -150,8 +150,8 @@ To make the common cases easier for Actions, we've added a new hook called `useA ```js const [error, submitAction, isPending] = useActionState(async (previousState, newName) => { - const {error} = await updateName(newName); - if (!error) { + const error = await updateName(newName); + if (error) { // You can return any result of the action. // Here, we return only the error. return error;