I'm new to NextJS and react and I'm trying to understand client components.
I have a...
I'm new to NextJS and react and I'm trying to understand client components.
I have a client component called Form.jsx like
export default function FormHome() {
... tons of client side javascript function ...
const [open, setOpen] = React.useState(false);
function onSubmit(data: z.infer<typeof FormSchema>) {
startTransition(async () => {
... other code ...
setOpen(true);
});
});
}
if(isDesktop) {
return (
<Form {...form}>
... a...