Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

❌ You 𝗺𝗶𝗴𝗵𝘁 not need a react form library ✅ Instead you can use the FormData API's

81,577 görüntüleme • 3 yıl önce •via X (Twitter)

11 Yorum

George Moller profil fotoğrafı
George Moller3 yıl önce

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 ↓

George Moller profil fotoğrafı
George Moller3 yıl önce

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 ↓

Gaurav Pandey profil fotoğrafı
Gaurav Pandey3 yıl önce

**might** is the catch😅

George Moller profil fotoğrafı
George Moller3 yıl önce

☝️ exactly

Ayush Raj ⚡ profil fotoğrafı
Ayush Raj ⚡3 yıl önce

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

George Moller profil fotoğrafı
George Moller3 yıl önce

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" }); } });

Darth Sidious profil fotoğrafı
Darth Sidious3 yıl önce

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

George Moller profil fotoğrafı
George Moller3 yıl önce

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

Mohamed Ramadan profil fotoğrafı
Mohamed Ramadan3 yıl önce

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 💪

Molly Boyle profil fotoğrafı
Molly Boyle3 yıl önce

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.

George Moller profil fotoğrafı
George Moller3 yıl önce

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.

Benzer Videolar