Skip to main content

Nextjs Server Actions

Server Actions vs other options for interacting with the server.

Server actions are primarily for making state changing actions against the server rather than fetching data.

CriteriaServer ActionstRPCGraphQLREST
Setup32-22
Ease of Use3111
Mutations2111
Queries-11-31
Type Safety112-2
Compatibility (MB)-3231
Without JS3-1-1-1

If simple web only solution Server Actions is the best option.

For more complex solutions or supporting mobile/desktop apps then tRPC.