Server Actions high level questions (scale, request library, exposing to other clients)

1) how are you supposed to scale a backend if your business logic is in react components? if this was never the idea then what's the point of server actions bar the ability to make requests to the server without shipping js 2) what's the new meta for requests? i didn't see a successful trpc implementation yet, will that not fit in the new paradigm? just react query and sharing a zod validator? 3) do i avoid server actions if i plan to make mobile client that will also consume the api? in a t3-turbo way
N
Neto336d ago
1) define scale 2) you can use trpc, vanilla client, to use trpc itself inside the server actions, but soon enough should be a better dx-wise feature 3) yeah, server actions are the heavy nextjs feature
M
matevzzzz336d ago
1) i mean already any middleware, business logic, permission systems etc. i'm having some trouble imagining putting in a server action 3) so the approach would be app router + serverless api
N
Neto336d ago
1) the server action is just an nice way of colocating your form endpoint, so middlewares, routing and all that still applies for any nextjs-like resource 3) you can make "core functions" and call them be on the server action or be on the serverless api
M
matevzzzz336d ago
ok that's pretty helpful, thanks
Want results from more Discord servers?
Add your server
More Posts
upload thing jesthow to i set up testing with jest on components that include uploadthing? [2:40 PM] seems like it keNextJS and Bare MetalWhat all features would break/may not work if I decide to deploy to NEXTjs to bare metal instead of Cloud storage solutions for collaborating on local filesI want to collaborate on .md files (via Obsidian. for developer documentaion) and video recordings wcold startsI’m having an issue with my first queries after the db going idle taking about 11s to 12s which is cAndroid emulator cannot connect to my Expo without tunnelHello, I am building an app with `create-t3-turbo` in windows 11. I keep getting the error connectis this middleware is good for longterm?hello guys, in these code snippet i want to check if user is subs and valid, but i im wondering if tBidrectional Infinite Scrolling ImplementationHi guys have you ever implemented something like this in a chat application? or any application for Is it possible to generate a github action to build a preview of a pull request in nextjs?Im looking for a way to generate preview for my nextjs project but I didnt find a way to do it that File Uploads to Local StorageI'm building a website for my brother's shop. They want an admin panel where they can add new producChange ctx.session.user values to include new ones? Bad idea?Right now when using `ctx.session.user` I get a few default options that come with t3-app. `.id`, `Next13 app-router: How to get request headers on client page comp?All my pages are client components because I want to use page transitions and need to wrap them in aCan i send a file from trcp router?I want to send a xlxs/csv file to FE (expo). Can i do this like expressJs? or do i need to first upluseSession has an empty user object {}When using the useSession hook, session.data contains `{ user: {}, expires: '2023-06-30T20:30:42.181TypeSafe external API ?I am currently communicating with an external API and after falling in love with TRPC, I would like Want to request only half of the audio file but not workingi request an audio file from my server and stream it to the browser .. on the browser i make a requeHow is realtime DB syncing accomplished without Firestore/Supabase?Hi! I've been working with Firestore for a long time now and gotten very used to the realtime db synDrag and drop library recommendation?Whats the community-favorite option right now? I saw that react-beautiful-dnd isn't being maintainedtRPC invalid_type error with ClerkHi, I have this weird issue I've been trying to resolve for a while now. This is the error in browsSave selected option on dropdownHii, I have a dropdown list that is being made from an array and a Save button. When I click the savEnd-to-end testing tools, SuggestionsHey everyone! 😄 I hope you're all doing well. 👋 I have a couple of questions for you, and I'd re