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 (