Stop Using Zod!! This is 10x Smaller!

preview_player
Показать описание

Zod provides type-safe schema validation, but what if there was an equivalent library that could send up to 10x less code to the browser? Check it out.

⭐ Become a full-stack web dev with Zero To Mastery Courses:

👇 Follow Me On Social Media:

Stop Using Zod!! This is 10x Smaller!

(00:00) Intro
(00:13) Welcome
(00:36) Valibot
(00:52) The difference between Zod and Valibot
(01:21) A familiar type-safe syntax
(01:58) Inferring types from schemas
(02:18) Parsing data with schemas
(02:39) Giving credit where it is due
(03:29) Final Verdict on Valibot

📚 Tutorial References:

Was this introduction to Valibot helpful? If so, please share. Let me know your thoughts in the comments.

#zod #valibot #typescript
Рекомендации по теме
Комментарии
Автор

Hey Dave, thank you for featuring Valibot on your channel! 🤖

FabianHiller
Автор

for frontend, sure! but build sizes mean next to nothing in the backend, plus fastify has integrations with zod for schemas that work perfectly.

mikevaleriano
Автор

Dave Gray on May 26: "You need ZOD"
Dave Two months Later: "Good bye ZOD"
😂😂... A tiny "meme-shove" from your very much loving follower of your channel, an admirer of ur comprehensive content and professional delivery. you are a true teacher and deserve a billion followers.
If only people stopped watching "learning 'x' in 'y' minutes" videos and started learning from you... Thanks for all the content your creating Buddy.

multibinary
Автор

Your video was truly engaging, even though it's about new technology I'm not familiar with yet. I found it surprisingly amusing and watched it till the end. I must admit, I'm not sure how ZOD works, let alone Valibot, but your content keeps me coming back for more. I look forward to understanding it all one day. Thank you for creating such entertaining and informative videos. Keep up the fantastic work! 🙂

Salah-YT
Автор

It's that time of the week again! Stop using X for Y because [insert speed/size] when X works great for years and most people are on high-speed internet 😅

codernerd
Автор

Thank you, Dave! I should give it a try!

dopetag
Автор

It does make me wonder why Zod isn't modular

snivels
Автор

Also started switching first schemas over to valibot especially cause I use most of them on the client as well where bundle Size makes a big difference 🎉 also like the ergonomics

CanRau
Автор

would you be willing to make a recoil video for state management?

imam_robani
Автор

Hi How can I use zod in frontend and backend MEVN . I deployed both separately in vercel So I can't access zod schema in production . Can I use mono repo for that problem ?

ThanHtutZaw
Автор

Is it works with react-hook-form? Thank you.

giannifed
Автор

Saw this on twitter a while back, definitely a nice improvement. Would love to convert some projects, but needing a resolver for react hook form. Hoping to see it soon! 🎉

EliBates
Автор

Totally, I wish TypeScript would let me to configure 'string', 'number' and 'boolean' native types before use like valibot lets me import specific runtime types. I don't need all the TS type system, c'mon just numbers and strings!!!

Seriously tho, we need better tree shaking. It's entirely possible to tree shake classes and modules with a capible compiler....just right click a class function and select "Find all References", if none are returned, cull it. I don't understand why one would resort to piece meal imports when a capable tool could just tree shake. Surely barrel importing Valibot would be the typical usage, in which been achieved over Zod?

BinaryReader
Автор

Dont care about bundle size of just 20kb extra

techs
Автор

I embrace the evolution, but the downsize is in the real world now you need to know at least three different tools only for schema validation: yup, zod, valibot. Luckily they don't ask this types of questions in interviews, yet.

jhaeberli
Автор

Nice overview; I would note though that "1x smaller" is zero, so 10x smaller? (Yes, yes, I know what you mean.)

MichaelCampbell
Автор

I don't even know what Zod is. Is it similar to joi?

darwinmanalo
Автор

Dave, how does it fair with react hook form?

ArcticPrimal
Автор

Should i first repeat javascript to learn Typescript?

CTILET
Автор

Considering Valibot is modular, you need to know what you're going to use, becoming quite a bit of a headache to use it, because you're likely not to remember everything you need to import, hence needing to go back and fourth... I don't really like that. A good workaround should happen in the build time removing unnecessary code/functions.

AmodeusR
welcome to shbcf.ru