From 8c1b2123c5eeb898be22c75cacc94d53f0baa2cf Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Wed, 23 Aug 2023 18:35:17 +0200 Subject: [PATCH] Add error to hook example As shown in example: https://github.com/pingdotgg/zact/blob/cfbb4a9639e24412fc648882d4aa43ee9417a6f2/examples/appdir/src/app/t3test.tsx#L7-L27 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 217cc43..1d16921 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ import { validatedAction } from "./action"; import { useZact } from "zact/client"; export const zactTestComponent = () => { - const { mutate, data, isRunning } = useZact(validatedAction); + const { mutate, data, isRunning, error } = useZact(validatedAction); return (
@@ -35,6 +35,7 @@ export const zactTestComponent = () => { Run server action {isRunning &&
Loading...
} + {error?.message} {data?.message}
);