create-t3-app icon indicating copy to clipboard operation
create-t3-app copied to clipboard

feat: Are you interested in adding Valibot?

Open fabian-hiller opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe.

Valibot is a new schema library, similar to Zod, but with a much smaller bundle size and probably better performance in real world scenarios. Are you interested in adding Valibot to create-t3-app?

Valibot announcement post: https://www.builder.io/blog/introducing-valibot

Describe the solution you'd like to see

Add Valibot as an alternatvie to Zod.

Describe alternate solutions

Add Valibot once v1 is reached.

Additional information

No response

fabian-hiller avatar Jul 31 '23 19:07 fabian-hiller

I saw Valibot on twitter a few days ago, looks exciting! Definitely interested, especially if/once there is a significant TS server performance benefit over Zod despite (near-)feature parity - the bundle size difference is not nearly as big a deal. But IMO the right order of events here is that a few key libraries like tRPC, react-hook-form, etc. get first class support for Valibot, and then we consider whether the switch is worth it for CT3A.

c-ehrlich avatar Aug 03 '23 08:08 c-ehrlich

Thank you for your feedback. I agree with you. For tRPC I have already submitted the corresponding PR and for React Hook Form a community member will do it. I'll probably report back here in September after Valibot is integrated into more projects and I've done some more performance research.

fabian-hiller avatar Aug 03 '23 09:08 fabian-hiller

trpc(https://trpc.io/docs/server/validators#with-valibot) and react-hook-form (https://github.com/react-hook-form/resolvers/pull/602) already support Valibot

stunaz avatar Aug 28 '23 01:08 stunaz