airjp73 / rvf

Easy form validation and state management for React and Remix
https://rvf-js.io
MIT License
825 stars 66 forks source link

[Feature]: Superstruct Support (official) #282

Open shellscape opened 1 year ago

shellscape commented 1 year ago

What is the new or updated feature that you are suggesting?

Please consider adding support for superstruct https://docs.superstructjs.org/

Why should this feature be included?

superstruct is a very popular option and has been around a very long time, with proven and consistent community support and active development. superstruct comes in third in downloads https://npmtrends.com/superstruct-vs-yup-vs-zod and has crossed the 1 million weekly mark,

It's also much lighter than the alternatives https://packagephobia.com/result?p=zod vs https://packagephobia.com/result?p=superstruct and has a much smaller bundle footprint, for example: https://bundlephobia.com/package/zod@3.21.4 vs https://bundlephobia.com/package/superstruct@1.0.3

superstruct is also faster than both yup and zod where it counts. https://dev.to/nicklucas/typescript-runtime-validators-and-dx-a-type-checking-performance-analysis-of-zodsuperstructyuptypebox-5416

I understand that there's an adapter pattern for the package, and it would be completely reasonable to dismiss this issue given that. however, I believe the info provided above is a compelling reason not to.

airjp73 commented 1 year ago

I'd happily take a PR adding an official superstruct adapter. It's not something I use personally, so I'm not sure I can set aside the time to implement it myself.

shellscape commented 1 year ago

sweet. we'll see about a PR for that.