Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Server Actions/RPC #2225

Open
oliver-oloughlin opened this issue Jan 9, 2024 · 0 comments
Open

[Feature request] Server Actions/RPC #2225

oliver-oloughlin opened this issue Jan 9, 2024 · 0 comments
Labels
feat New feature or request

Comments

@oliver-oloughlin
Copy link

oliver-oloughlin commented Jan 9, 2024

This is a feature request for Next.js inspired server actions or some form of RPC that will enable the following:

  1. Being able to create server-side functions that can be called from the client
  2. 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.

@marvinhagemeister marvinhagemeister added the feat New feature or request label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
2 participants