4 ms·
"server actions" seems to be a NextJS thing, not a JS thing? JS does not mean React and NextJS. The communication between frontend and backend is (almost) alway
by williamdclt 1y ago
"server actions" seems to be a NextJS thing, not a JS thing? JS does not mean React and NextJS. The communication between frontend and backend is (almost) always HTTP, regardless of the languages and frameworks (server actions are http). Having a wrapper around HTTP isn't really a compelling reason to choose a technology for the very large majority of people: probably the opposite actually.
IDK what you mean by "deal with OpenAPI", OpenAPI is a spec not a technology like graphql.
In all honesty (and sorry for the directness), you don't really seem to understand these concepts and how relevant or not they are to this conversation
- koakuma-chan 1y ago> server actions" seems to be a NextJS thing, not a JS thing? It's a JS framework thing. Every mainstream JS framework has server actions or equivalent. > Having a wrapper around HTTP isn't really a compelling reason to choose a technology for the very large majority of people: probably the opposite actually. It is way more convenient to write a server action and be able to immediately use it in a client component than having to write an HTTP endpoint in a separate back-end project, and then regenerate your client via OpenAPI, or whatever else you use. > IDK what you mean by "deal with OpenAPI" I mean dealing with tooling to generate an HTTP client from OpenAPI schema. > In all honesty (and sorry for the directness), you don't really seem to understand these concepts and how relevant or not they are to this conversation Wrong
- dboreham 1y agoRaising my hand with the opinion that you're wrong. Making it confusing as to whether code is executing on server or client is imho an antipattern.
- koakuma-chan 1y agoI’m wrong in what? Even if you’re confused whether server actions run on the server or on the client, it doesn’t take away benefits I listed before.
- williamdclt 1y ago> Every mainstream JS framework has server actions or equivalent No. "Server actions" are a React concept, it has little to do with backend technology (the backend still speaks HTTP). This concept is completely irrelevant to most big frameworks like Express, NestJS, Koa, Hapi. Next is barely a "backend" framework: it's rather a React server framework that has a few basic backend functionalities.
- koakuma-chan 1y agoOkay, every full-stack JS framework.