From 537bd05e560ea14ad0ad43835a6128d52b2c1d7c Mon Sep 17 00:00:00 2001 From: Shubhdeep Chhabra Date: Sat, 27 Apr 2024 01:10:06 +0530 Subject: [PATCH] to make examples consistent. (#6793) --- src/content/blog/2024/04/25/react-19.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/blog/2024/04/25/react-19.md b/src/content/blog/2024/04/25/react-19.md index 4a6782cc1..8d6749c4d 100644 --- a/src/content/blog/2024/04/25/react-19.md +++ b/src/content/blog/2024/04/25/react-19.md @@ -153,8 +153,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;