Zod Validation in React (Complete Tutorial)

Поділитися
Вставка
  • Опубліковано 6 лис 2024

КОМЕНТАРІ • 33

  • @oProfessorJohnny
    @oProfessorJohnny 16 днів тому +1

    I've never said on any channel before, but of course you are the best teacher that dont speak my nativelly language, congratulations you always make everything easily to understand, you have saved me alot of times in my job hahhaha 🎉

  • @adityaprasad3122
    @adityaprasad3122 Місяць тому +24

    Please make a video about axios interceptors and how to manage access & refresh token from backend in reactjs

  • @3illanon145
    @3illanon145 Місяць тому

    so valuable. so to the point. i just understood zod for the first time

  • @nourmustafa5094
    @nourmustafa5094 Місяць тому +2

    The way you validated .env file is cool, thanks Darius❤

  • @DiogoLScarmagnani
    @DiogoLScarmagnani Місяць тому

    I never thought zod could be used to validate env variables. Very good approach and very good video.

    • @27sosite73
      @27sosite73 Місяць тому

      it is a default in T3 stack

  • @xphstos_
    @xphstos_ Місяць тому +1

    Great video, as always!
    I would love to see one with Valibot!

  • @garudaputro
    @garudaputro Місяць тому

    This is what i looking, thanks for explain this topic with easies way ❤ love it

  • @ice_donut
    @ice_donut Місяць тому

    Every tutorial you create is pure gold! Thanks! 🇺🇦

  • @dcmbassi
    @dcmbassi Місяць тому

    So many useful tidbits in this one. I didn't know about nullish, or the safeParse, or the trick with the environment variables. Thanks, Darius.

  • @kalideb-y3y
    @kalideb-y3y Місяць тому

    I like the bonus part 👍👍👍

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt Місяць тому

    Thank you compa, your content is excellent, keep it up.

  • @SimeonIeroteev
    @SimeonIeroteev Місяць тому

    Nice tutorial and excellent explanation! Can you make a video about Vitest for unit testing? Thank you in advance! Best regards!

  • @gauravbawa5609
    @gauravbawa5609 Місяць тому

    once again blast with great content🎉

  •  Місяць тому

    Thank you for the great video. Also, can you share the theme and ide settings you used? If you have shared it before and I missed it, please excuse me.

  • @aliakbarmohajeruni3628
    @aliakbarmohajeruni3628 Місяць тому

    Thank you

  • @tusharr911
    @tusharr911 Місяць тому

    Perfection

  • @bentennyson1897
    @bentennyson1897 Місяць тому +4

    Hey, can you make a full fledged live project on youtube using all the practical libraries like tanstack query, zod, zustand, etc. using Next JS as a framework

  • @Lucas-md8gg
    @Lucas-md8gg Місяць тому +1

    Make a video about Tanstack table and router, if possible!

  • @AntNZ
    @AntNZ Місяць тому

    Would be awesome to get a tutorial on how to integrate types generated by Prisma into zod schemas with minimal refactoring each time a model changes.

  • @muhamadbintangrk4693
    @muhamadbintangrk4693 Місяць тому +2

    trpc pls

  • @CLeovison
    @CLeovison Місяць тому

    Hi Darius,
    Can you create a video on how to handle error in react without try catch? Because i think it was better to actually handle the error on your own rather than relying on try catch to handle the error for you.
    Thank you so muuch

  • @dharylovey
    @dharylovey Місяць тому

    You forget to add date and useFieldArray

  • @daniel-fi7be
    @daniel-fi7be Місяць тому

    the project react is not openeing

  • @serhiyi7526
    @serhiyi7526 Місяць тому +1

    thanks for the video, but I still don't understand the meaning of this library when using typescript (if we were talking about js, then yes). But typescript has its own descriptions of models

    • @reybontje2375
      @reybontje2375 Місяць тому

      It's generally used for validation of data that can't easily be typed with TypeScript, as well as to ensure that your types are actually valid during runtime.
      To expand on that last point, TypeScript transpiles to JavaScript. When you have a TypeScript object that says you should have certain fields/properties, the reality is that you aren't guaranteed to have those fields if they come from third-party APIs or even internal APIs. Validation is just a way to enforce the assumptions made by TypeScript.
      I find that assuming data is valid when it is not is more dangerous and can create harder-to-spot bugs than going through the effort of verifying that your data is correct at runtime.