From c485ef2fb9510a18f018fb68920ba46eaa8eb2e2 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Fri, 5 May 2023 07:46:14 +0200 Subject: [PATCH] Use common component declaration style --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 217cc43..a5398b1 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ export const validatedAction = zact(z.object({ stuff: z.string().min(6) }))( import { validatedAction } from "./action"; import { useZact } from "zact/client"; -export const zactTestComponent = () => { +export default function ZactTestComponent() { const { mutate, data, isRunning } = useZact(validatedAction); return ( @@ -38,7 +38,7 @@ export const zactTestComponent = () => { {data?.message} ); -}; +} ``` ### Client WITHOUT custom hook @@ -50,7 +50,7 @@ Yes you can just import them and call them like promises too import { validatedAction } from "./action"; -export const zactTestComponent = () => { +export default function ZactTestComponent() { return (
); -}; +} ```