3 ms·
Technically, they are a React thing[1], but Next has the best implementation. You'll still need classic client-server request patterns in most applications, but
by verdverm 2y ago
Technically, they are a React thing[1], but Next has the best implementation. You'll still need classic client-server request patterns in most applications, but server components and actions mean you can skip having to maintain a REST API for a lot of basic things too. It also means users cannot access data via an (undocumented) API, which can be a pro or con as a developer, depending on perspective.
[1] https://react.dev/reference/rsc/server-actions https://react.dev/reference/rsc/server-actions
- ivanfranciscoj 2y agoThe idea of skipping maintaining a REST API is cool, but it only works (in a normal project) for some specific use cases; most of the time, having a regular endpoint in a REST API is more accessible to implement. I am saying there are use cases for server actions and some perks, but the future is still with classic requests to endpoints, and "server actions" are more a tool than a standard.
- verdverm 2y agoNext JS is a limited case by definition, for people who want server side rendering React, it offers the best DX by a wide margin