Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Conversation

@karlhorky
Copy link

As shown in example:

export const T3TestComponent = () => {
const [input, setInput] = useState("");
const { mutate, data, isRunning, error } = useZact(validatedAction);
return (
<div className="flex flex-col text-xl gap-4 text-center w-full md:max-w-xl">
<input
type={"text"}
value={input}
onChange={(e) => setInput(e.target.value)}
className="bg-slate-300 text-slate-900"
/>
<button onClick={() => mutate({ stuff: input })}>
Run server action
</button>
{isRunning && <div>Loading...</div>}
{error?.message}
{data?.message}
</div>
);
};

@vercel
Copy link

vercel bot commented Aug 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zact-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2023 4:36pm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant