Skip navigation
❌ You π—Ίπ—Άπ—΄π—΅π˜ not need a react form library
0:00 / 1:03

❌ You π—Ίπ—Άπ—΄π—΅π˜ not need a react form library

George Moller

@_georgemoller119K followers

Visit on X
667 likesDownloadOriginal post

81,577 views

❌ You π—Ίπ—Άπ—΄π—΅π˜ not need a react form library βœ… Instead you can use the FormData API's

11 Comments

Comments from the original post on X (Twitter)

  • George Moller's profile picture

    @_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

  • George Moller's profile picture

    @_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

  • Gaurav Pandey's profile picture

    @pandeygaurav31

    **might** is the catchπŸ˜…

    2 likes

  • George Moller's profile picture

    @_georgemoller

    ☝️ exactly

    1 like

  • Ayush Raj ⚑'s profile picture

    @me_ayushraj

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

    1 like

  • George Moller's profile picture

    @_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

  • Darth Sidious's profile picture

    @Ade_LaNa

    "You might not need a react form library. You just need to install zod instead"

    1 like

  • George Moller's profile picture

    @_georgemoller

    you should use zod with react-hook-form too :)

    1 like

  • Mohamed Ramadan's profile picture

    @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

  • Molly Boyle's profile picture

    @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

  • George Moller's profile picture

    @_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