From f6c97047cbfece352125e8d221d3d9811308c2db Mon Sep 17 00:00:00 2001 From: Shubhdeep Chhabra Date: Fri, 26 Apr 2024 08:35:34 +0530 Subject: [PATCH] to make examples consistent. --- 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 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;