Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Adding form validation to your React app? Try the "reward early, punish late" pattern 🏆

36,764 görüntüleme • 2 yıl önce •via X (Twitter)

11 Yorum

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

You can codegen this for any app using simple-form!

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

Got a full code walkthrough using Astro and Next.js!

Jamon profil fotoğrafı
Jamon2 yıl önce

I love these types of subtle UX improvement tips.

Deadlock profil fotoğrafı
Deadlock2 yıl önce

These features already available in react-final-form. it's an underdog for form state management as well as light weight package

KEV MOK profil fotoğrafı
KEV MOK2 yıl önce

Really top quality video. Have you thought of using Zod with your form validations?

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

@LinkedKev Not just *thought* about it. I made a wrapper library 😄

Brian Jordan profil fotoğrafı
Brian Jordan2 yıl önce

This has brought me psychic peace, always felt like early early was wrong but not sure why

Tracy Lee | ladyleet profil fotoğrafı
Tracy Lee | ladyleet2 yıl önce

Great video, Ben!!!

John Forte profil fotoğrafı
John Forte2 yıl önce

Yep, this is why most form packages have isTouched (onBlur) or isDirty (after user modifies field) to allow you to implement things like this.

Magne profil fotoğrafı
Magne2 yıl önce

what about checking on input but only after user stops typing? solves both cases I think

Ben Holmes profil fotoğrafı
Ben Holmes2 yıl önce

Sounds like validating on a debounce. That's nice sometimes as well! Still, it assumes the user is able to type at a certain speed, and it's hard to dial in an accessible value. Waiting for blur makes certain you validate once the user is done

Benzer Videolar