Next JS 13 Server Actions. Is it really PHP ?

Next JS announced experimental server actions API. It provides a great abstraction to perform server side data mutations ,reduce client side javascript and create instant server apis.
hat writing server actions felt like writing PHP.

#nextjs #serveractions #php

In this video I am going to show you various ways you can use server actions in you next js app . Compare it with a php application side by side and conclude if it indeed feels like writing PHP

πŸ’‘Subscribe For MoreπŸ’‘
https://www.youtube.com/channel/UCcSeQUrdrNObZqyqMD-913g

πŸ“ƒ Docs Server actions πŸ“ƒ
https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions

πŸ“ƒ useTransition React πŸ“ƒ
https://react.dev/reference/react/useTransition#preventing-unwanted-loading-indicators

— Chapters —
00:00 – Intro
00:29 – What are server actions ?
01:25 – What are we going to build ?
02:08 – Building user form in next
06:48 – useFormStatus
09:02 – Building user form in PHP
11:10 – useTransition to delete user
14:51 – Delete user in PHP
15:51 – Passing actions as props
19:24 – Optimistic Updates
26:52 – Conclusion
27:23 – Outro

πŸ”— Links πŸ”—
1. Link to the next repo https://github.com/Viijay-Kr/server-actions-next
2. Link to the php repo https://github.com/Viijay-Kr/server-actions-php
3. Flashing UI open issue in Next JS https://github.com/vercel/next.js/issues/49424

Follow me on twitter πŸ‘‹πŸΌ @ https://twitter.com/reactporiyalar
Follow me on github πŸ‘‹πŸΌ @ https://github.com/Viijay-Kr