You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request for Next.js inspired server actions or some form of RPC that will enable the following:
Being able to create server-side functions that can be called from the client
A type-safe interaction between the client and the server
My ideal solution would be a dedicated folder, like for islands, that indicates the functions exported from within files in that folder are always run on the server, and handle the transition of data from the client to the server and vice versa, while acting like a normal function call.
One way I imagine this could be solved is to generate route handlers and API client code from whatever is defined by the server functions, to allow for requests to be sent abstracted by normal function calls, while the route handlers take care of parsing the incoming request and invoking the server function.
A tRPC inspired solution might also be relevant.
The text was updated successfully, but these errors were encountered:
This is a feature request for Next.js inspired server actions or some form of RPC that will enable the following:
My ideal solution would be a dedicated folder, like for islands, that indicates the functions exported from within files in that folder are always run on the server, and handle the transition of data from the client to the server and vice versa, while acting like a normal function call.
One way I imagine this could be solved is to generate route handlers and API client code from whatever is defined by the server functions, to allow for requests to be sent abstracted by normal function calls, while the route handlers take care of parsing the incoming request and invoking the server function.
A tRPC inspired solution might also be relevant.
The text was updated successfully, but these errors were encountered: