Next.js 14 Server Actions | Everything you need to know!

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

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

  • @janmarshalcoding
    @janmarshalcoding  9 месяцев назад

    Quick FYI, supabase changed a few things in regard to their core infrastructure (supervisor). To make the connection with prisma and supabase work, please follow the following guide: supabase.com/partners/integrations/prisma

  • @adarshrathi8265
    @adarshrathi8265 9 месяцев назад +1

    you are excellent buddy , love from india

  • @2pacrapempire866
    @2pacrapempire866 8 месяцев назад

    This is amazing, thanks man.

  • @njihiamark6926
    @njihiamark6926 11 месяцев назад

    Thank you Marshal!

  • @arshah246
    @arshah246 Год назад

    That's really great you haave summorized many new concepts of next js. I think it would be great if you add somee info about disabling the button while saving/updating thee data. Although really really great conceptual video especially using a server component inside child component and it doesn't cause hydration

    • @joakuvideo
      @joakuvideo 11 месяцев назад +1

      disable={pending}

  • @afebriansyah805
    @afebriansyah805 5 месяцев назад

    amazing explain

  • @debrauwermichael2366
    @debrauwermichael2366 10 месяцев назад

    Great video, but my problem is when I export the functions from "actions.ts", my "/better" page gives me this error: Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".

  • @zunnoorainrafi5985
    @zunnoorainrafi5985 Год назад

    Hi Marshal,
    is there anything like server actions in Remixjs?
    Which you think is better in Server Components between Remixjs and Nextjs?
    Waiting for your kind reply...

    • @janmarshalcoding
      @janmarshalcoding  Год назад

      Hi,
      In Next.js you have server actions, in remix you have actions. The difference is that you can call server action from the component level, while in remix you call them from the route level.
      There is no better in nextjs or remix. Use what you like and feels more natural.

    • @zunnoorainrafi5985
      @zunnoorainrafi5985 Год назад

      @@janmarshalcoding OK, thanks.

  • @prashlovessamosa
    @prashlovessamosa Год назад

    Thanks for sharing quite useful.

  • @horacinis
    @horacinis Год назад

    How can I set the formData to an empty string after creating a new todo?

  • @Aejkv
    @Aejkv Год назад

    What is your theme please ?

  • @mdazimbabu5001
    @mdazimbabu5001 Год назад

    Is server actions possible with separate backend ?

  • @adenugbamicheal2140
    @adenugbamicheal2140 Год назад

    I'm enjoying this... more content boss

    • @janmarshalcoding
      @janmarshalcoding  Год назад +1

      Next week, something special 🤫🤫🤫

    • @arshah246
      @arshah246 Год назад

      ​@@janmarshalcodinge commerce app with AI chatboy will be the best because will cover all the modern chalanges and would be great for us

  • @sksabbirhossain2686
    @sksabbirhossain2686 10 месяцев назад

    😍😍😍😍😍😍😍😍🥰🥰🥰🥰🥰🥰🥰🥰

  • @galaxian9393
    @galaxian9393 11 месяцев назад

    404 error in your GitHub repo

  • @araz911
    @araz911 11 месяцев назад

    You spent 1h on explaining almost nothing

    • @janmarshalcoding
      @janmarshalcoding  11 месяцев назад +1

      You're welcome 😉

    • @joakuvideo
      @joakuvideo 11 месяцев назад

      I loved the explanation, thanks!@@janmarshalcoding

    • @noormuhammad888
      @noormuhammad888 7 месяцев назад

      what are you talking about? He has explained server actions better than many others did.

  • @arshah246
    @arshah246 11 месяцев назад

    i am facing an issue while updating my todo. in my case i am using another file todo/[id]/page.ts for updating my todo here the problem begings. i get the id of todo using params. and send the id to form using input type=hidden method. again i catch the id const todoid=formdata.get('id') as string and pass this id to prisma for updating it shows me error. because i am converting the id as string.

    • @janmarshalcoding
      @janmarshalcoding  11 месяцев назад +1

      what exactly is the error?

    • @arshah246
      @arshah246 11 месяцев назад

      @@janmarshalcoding sir i have resolved the error the error was in my params. when i console log the params i find out that id is inside the params object and i was only using params.id that is why it was showing me null value or undefined then i used params.params.id it show me the id of the todo. thanks for your time.

    • @janmarshalcoding
      @janmarshalcoding  11 месяцев назад

      Cool, if you destructure the params you could also just do params.id, so in that sense ({params}: {params: {id: string}}).