This is the next.js form validation library you need to try out

Поделиться
HTML-код
  • Опубликовано: 18 май 2024
  • My Products
    🏗️ WDC StarterKit: wdcstarterkit.com
    📖 ProjectPlannerAI: projectplannerai.com
    🤖 IconGeneratorAI: icongeneratorai.com
    📝 ThumbnailCritique: thumbnailcritique.com
    Useful Links
    💬 Discord: / discord
    🔔 Newsletter: newsletter.webdevcody.com/
    📁 GitHub: github.com/webdevcody
    📺 Twitch: / webdevcody
    🤖 Website: webdevcody.com
    🐦 Twitter: / webdevcody

Комментарии • 46

  • @SeibertSwirl
    @SeibertSwirl 14 дней назад +31

    Dang babe! You’re a machine!! Good job as usual ❤

  • @ankitkumarjat9886
    @ankitkumarjat9886 14 дней назад +7

    Conform is the best approach right now available. React-hook-from team is also working to make react-hook-from progressively enhanced and will work smoothly in future.

  • @griffadev
    @griffadev 14 дней назад +8

    I'm fairly sure all those shadcn wrappers with useForm are optional, you could recreate identical code and functionality with your basic inputs just following the react hook form docs. The shadcn helpers come in handy when you need to integrate with a controlled react component I think

  • @roberth8737
    @roberth8737 14 дней назад +4

    I usually don´t go for SaaS templates - but this one is beginning to look golden

  • @maddada
    @maddada 14 дней назад +2

    Thank you for this! Really enjoy these "what I'm working on" vids.
    I'll try this out in my current project for sure, didn't like how convuluted forms can get with other libraries.

  • @qudusayo
    @qudusayo 14 дней назад +3

    For the red line issue, I think you can try switching the typescript to use workspace version instead of using vscode version.

  • @andreh.9300
    @andreh.9300 11 дней назад

    Awesome, thanks for sharing! I agree the react-form-hook setup is everywhere throughout our codebase at work. I'd been hoping to slim it down, so I'm definitely gonna try this out.

  • @diego0ji
    @diego0ji 14 дней назад +1

    Nice, react hook form make me anxious ahah

  • @kyrregjerstad
    @kyrregjerstad 14 дней назад

    This looks really cool! I've been using shadcn forms for the last couple of months and there's just sooo much code for even a simple register form... Coming from a sveltekit world where superform is a thing, this seems like a good contender.

  • @jd_27
    @jd_27 14 дней назад

    Thanks Cody!

  • @WebDevCodeCrush
    @WebDevCodeCrush 14 дней назад

    Nice, we’ll take a look. My goto is react hook form. You’re right, it does take a lot to get a simple form running, but it is what it is. Coming from my php days it’s all good though.

  • @user-vd3ph6zh8q
    @user-vd3ph6zh8q 14 дней назад +1

    You could use tanstack query with your actions to get pending and error states?

  • @darwinnarro2889
    @darwinnarro2889 14 дней назад +2

    Is it better than react-hook-form? Does it makes better the experience of handling 20+ fields? Does it have a nice type-safety experience too?

    • @WebDevCody
      @WebDevCody  14 дней назад +1

      I think react hook form is still our best option, but it doesn’t support progressive enhancement from what I understand

    • @IvanKleshnin
      @IvanKleshnin 11 дней назад

      Conform has smaller API surface, feels better. But the docs are abysmal.

  • @sincethatmoment
    @sincethatmoment 14 дней назад +2

    I played around with shadcn forms for very little bit and it seems to me their wrapper components complicate more things than solve. I don't find them useful at all

    • @BobBobIsSwag
      @BobBobIsSwag 14 дней назад

      they are indeed very useful for form validation, validation error messages and integrating the useful utilities that the useForm hook provides. All of this by just copy-pasting code from their website and making changes as necessary.

  • @a2zcourse
    @a2zcourse 14 дней назад

    Can you do a video about Dokploy , the alternative for vercel?

  • @tomideo.s884
    @tomideo.s884 11 дней назад

    I use formik till date. It just feels easy for form validation

  • @AyoubNachat-wm4no
    @AyoubNachat-wm4no 14 дней назад

    Hi cody can you upload an updated video on hosting a nextjs new created app on AWS with SST?
    Thanks!

  • @DouglasSouza-te9bt
    @DouglasSouza-te9bt 14 дней назад

    Could you share your user settings.json?

  • @sadkebab
    @sadkebab 9 дней назад

    It looks super cool but when I tried it I was not able to make it work with next-safe-action... I will stick with with react-hook-form for now

  • @StabilDEV
    @StabilDEV 8 дней назад

    After having tried many approaches I've settled for plain forms + server action returning validation errors + a SubmitButton component showing a spinner via useFormState + basic html client side validation. Less than half the code and headache than with all those libraries

    • @WebDevCody
      @WebDevCody  8 дней назад

      Yeah, less code but I like that extra client side custom validation polish

  • @tomirodriguez7195
    @tomirodriguez7195 14 дней назад

    The thing you have with react-hook-form is the typing, which I don't see here. I like how every field's value has its proper typing, all granted from RHF. The code is a little trade-off, which, by the way, I think you could add an extra abstraction to the shadcn form and make it look nicer. As for now, I don't see any form validator that would make me switch from RHF because of all those things such as typing and code suggestions.

    • @WebDevCody
      @WebDevCody  14 дней назад +5

      I will say I’ve already run into this lack of typing issue. Also this library doesn’t seem to reset the form after submit. Back to RHF for me

    • @OrigamiSage
      @OrigamiSage 13 дней назад

      Watch out for the Tanstack Form

  • @gilbertigwegbe9481
    @gilbertigwegbe9481 14 дней назад

    What extension are you using to display the errors on the editor?

  • @Tyheir
    @Tyheir 14 дней назад

    I also have been having trouble with automatic imports in a brand new next project.

    • @WebDevCody
      @WebDevCody  14 дней назад +2

      Bro for real idk what’s going on but it’s killing me

  • @PeterZhou-vi3ep
    @PeterZhou-vi3ep 14 дней назад

    How to handle global exceptions in action❤

  • @appel-32
    @appel-32 14 дней назад

    honestly ive been married to zod since you first introduced it to me way back then

  • @oliversaxon8656
    @oliversaxon8656 11 дней назад

    I think it's a bit unfair to compare react-hook-form + shad-cn to just pure reaxct and jsx + this conform library. shad-cn and react-hook-form provide more than just form validation

  • @JH-bb8in
    @JH-bb8in 14 дней назад +4

    Honestly if you are a developer who's spending all your time learning every library, you will later realize you are just wasting your time. (unless you are a content creator)

    • @WebDevCody
      @WebDevCody  14 дней назад +5

      There are benefits to exposing yourself to new ways to achieve things. You get to understand trade offs.

  • @qudusayo
    @qudusayo 14 дней назад +2

    Looks similar to using yup and formik.

  • @LarsRyeJeppesen
    @LarsRyeJeppesen 14 дней назад

    I don't use Nextjs. So...

    • @WebDevCody
      @WebDevCody  14 дней назад +5

      But yet you still watched a video on nextjs 🧐

    • @kelvinxg6754
      @kelvinxg6754 12 дней назад

      I don't use nextjs, i don't even code in js or ts
      But it seems nice . I would try it for my next personal project.
      ​@@WebDevCody

  • @porcupinetree-bb3zg
    @porcupinetree-bb3zg 13 дней назад

    hopefully the signals proposal makes it to stage 4 and turns next.js/react into jquery. i would host a celebration with my coworkers.