Zod's Object Parsing: A Game Changer for TypeScript

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • Instead of having to check each property of an object or do some funny type checking yourself, with zod, you can validate the shape of an object with parsing! It's super convenient and can also benefit the security of your web projects. Let's take a look at how it works!
    ⭐ Our startup: wordful.ai
    ⭐ My GitHub: github.com/joschan21
    The stuff I use to make my videos
    Camera: amzn.to/3XcqRKO
    Light: amzn.to/3Xc1yIE
    Keyboard: amzn.to/3CKxnAi
    Mouse: amzn.to/3CNcfcm
    Microphone: amzn.to/3iybVHC
    Headphones: amzn.to/3IHTTgH
    thats pretty much it. Those are affiliate links so I might earn a commission if you purchase after clicking them. :^)
  • Наука та технологія

КОМЕНТАРІ • 15

  • @webdevbydawid
    @webdevbydawid Рік тому +4

    Nice quick demonstration of Zod, its is super nice. I really enjoy working with react hook form (rhf) and Zod for forms validation, can recommend!

  • @mohaniya15
    @mohaniya15 Рік тому

    Great quality Josh! Love watching your stuff

  • @kartik-k
    @kartik-k Рік тому

    Finest video I have seen on zod🔥🤯

  • @coolmind2476
    @coolmind2476 4 місяці тому

    Is it possible to parse an unknown object without schema and get the types of the unknown objects components?

  • @stevebendersky2056
    @stevebendersky2056 9 місяців тому

    so should I use safeparse or parse?

  • @Pushpaje2130
    @Pushpaje2130 Рік тому

    Sir please consider my request for setting up prettier and eslint in our project and what are the other precaution we can take in mid to large size project in order to scale it.

    • @deletrious
      @deletrious Рік тому +2

      If you can’t set up your own config files why are you building a mid to large project?

  • @wyattandfriendshailey
    @wyattandfriendshailey Рік тому +1

    Kneel before Zod

  • @atoz8729
    @atoz8729 Рік тому

    Is there any way to convert directly user object to zod schema .ie can we use user object at the time of zod object creation ? Please help

  • @RemotHuman
    @RemotHuman Рік тому +1

    you can use ts-node to run typescript files without it being as much of a pain to set up

    • @RemotHuman
      @RemotHuman Рік тому

      scratch that esrun is way better

  • @skyzane2735
    @skyzane2735 8 місяців тому

    What about Valibot? I see few people are now saying in youtube that Valibot would be better than Zod.

  • @borislavborisov9063
    @borislavborisov9063 2 місяці тому

    saying javascript does not highlight syntax errors but typescript does is just wrong, both js and ts are purely text with some defined rules, so if you don’t have highlighting of the errors you are just lacking a static analyzer tool like eslint on your text editor. It is just that vscode comes with tsserver that would highlight you these errors when writing typescript but it is not like “javascript does not have static code analysis” 😅😅