I'm having trouble understanding what Next.js 13 Server Actions are. I'm not getting it.
Is it just basically a way to run API calls in a server component to get or post data before sending the finished code to the client side?
Is that all a Server Action is? A way to use APIs on the server instead of the client?
Couldn't you already do this before Server Actions though?
What are Server Actions and how do they work theoretically? Please explain as if I'm a 6th grader just learning how to code.
Thank you.
I learned Server Actions are a way to run functions on the server that you don't want to be run on your client side.
The best example of this I can think of is analytics. Instead of running analytics API calls on the client side, which would slow down the UI, you can can run analytics API calls on the server.
This video helped me understand everything better than any other video I've watched: https://youtu.be/hD11c2mrq6Q