Skip to content

Latest commit

 

History

History

form-examples

README.md

PrimeReact with form libraries

The same deploy form built three times with PrimeReact in styled mode, once for each form library, so they can be compared side by side. All three validate with Zod.

Open in StackBlitz

Run it

npm install
npm run dev

Then open http://localhost:3000 and pick an example:

Route Library Binding
/react-hook-form React Hook Form useForm and Controller with a zodResolver
/tanstack-form TanStack Form useForm and form.Field with a Standard Schema
/formik Formik useFormik with a Zod validation schema

Where to look

Every route renders the same PrimeReact components (InputText, Select, CheckboxGroup, Message, Button), so the only difference between them is how the form library reads values, passes changes on and shows errors.

  • components/prime-ssr-provider.tsx sets up PrimeReactProvider.

Read more in the PrimeReact styled mode docs.