The BEST Way To Create Server Actions - Next.js

Поділитися
Вставка
  • Опубліковано 4 лип 2024
  • zsa is a library that allows for developers to create typesafe server actions inside a Next.js application.
    zsa actually stands for Zod Server Actions and utilizes zod for creating type safety within your code.
    We will go over how to create server actions with the zsa library, how to create procedures (aka middleware) and much more.
    Timestamps
    0:00 Intro
    0:32 What is zsa (Zod Server Actions)?
    1:43 Creating Your First Server Action
    4:20 useServerAction() Hook on client side
    9:28 Creating Procedures for your server actions
    15:30 Quickly Going Over some other zsa library features
    18:10 Outro

КОМЕНТАРІ • 7

  • @starlord7526
    @starlord7526 День тому +1

    Good to see you Brett after a really long time. Your tutorials have always been easy to understand

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  День тому

      Thank you man! Yes it has been a while since I have uploaded. However, I have a lot of content on the way! Thanks for the support!

  • @djalalmaster1018
    @djalalmaster1018 2 дні тому +2

    Very handy library, can you do a little explanation about optimistic function?

  • @destocot1729
    @destocot1729 2 дні тому +1

    Very cool library I recently switched to valibot from zod but might have to go back to zod to use this library

    • @brettwestwooddeveloper
      @brettwestwooddeveloper  День тому +1

      Yes I recommend Zod and I have never heard of valibot. I will check it out though. Any thoughts on valibot?

    • @destocot1729
      @destocot1729 День тому +1

      ​@@brettwestwooddeveloper It's almost the exact same API as zod just has a smaller bundle size