Hi guys,
I am building a custom form for a client. However, as soon as I add the useState hook, the code component crashes. After adding
const [formState, setFormState] = useState<State>({});
I am getting this error.
The form itself is pretty simple, but quite long. This is the .webflow.tsx file:
import { declareComponent } from "@webflow/react";
import { OrdersForm } from "./OrdersForm";
// Declare the component
const OrdersFormWebflow = declareComponent(OrdersForm, {
// Component metadata
name: "Orders Form",
description: "A form for ordering custom cuts",
group: "Forms",
// Prop definitions
props: {},
// Optional configuration
options: {
applyTagSelectors: true,
ssr: false,
},
});
export default OrdersFormWebflow;
Is there something I am missing on export?
Help appreciated.
Cheers,
Slawa
