β You πΊπΆπ΄π΅π not need a react form library
@_georgemoller119K followers
81,577 views
11 Comments
Comments from the original post on X (Twitter)

@_georgemoller
I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics just like this one. Check them out β
7 likes

@_georgemoller
I've been working professionally with React for more than 8 years and I compiled all my knowledge into 100+ infographics just like this one. Check them out β
4 likes

@pandeygaurav31
**might** is the catchπ
2 likes

@_georgemoller
βοΈ exactly
1 like

@me_ayushraj
Can I do validation of a particular field based on some other field without using useEffect ?
1 like

@_georgemoller
You can do that with Zod yes an refine (superRefine) SomeSchema.superRefine(({ confirmPassword, password }, ctx) => { if (confirmPassword !== password) { ctx.addIssue({ code: "custom", message: "The passwords did not match" }); } });
3 likes

@Ade_LaNa
"You might not need a react form library. You just need to install zod instead"
1 like

@_georgemoller
you should use zod with react-hook-form too :)
1 like

@mramadanahmed
Please be clear about "might not" because you "might not" need zod as well π FormData can be used for a very simple projects, however for big scale products react-hook-form is the hero. It provide fully typescript support and also validation for object and arrays πͺ
1 like

@MolliBoyle
I'm a heavy user and fan of react-hook-form. But I didn't realize all the native capabilities of FormData and form elements. Might reach for this first for simpler forms.
1 like

@_georgemoller
Yes I think for simpler forms using the native api makes sense. Also, I love exploring native web APIs, that's what actually drove me to write this tweet π . I'm a heavy user and fan of react-hook-form as well, I used formik before and really like the API that rhf offers.
1 like
