From Data Fetching to Data Mutations
At this point, you have learned a lot about RSCs, client components, and how they can (and cannot) work together. In the Making Sense of RSCs section, you also learned about some advantages offered by RSCs.
Of course, you also might want to change data, though—not just load and display it.
Handling Data Mutations with Server Actions
React does not just provide support for RSCs; it also allows you to add so-called Server Actions to your applications.
Server Actions build up on the same idea as client (form) actions, which were introduced and explained in Chapter 9, Handling User Input & Forms with Form Actions. However, Server Actions, as their name implies, will execute on the server side, not on the client side.
Hence, you can use Server Actions to retrieve submitted user input on the server and process it there. For example, you could store the submitted data in a file or database.
Consequently, Server Actions...