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

feat: Change naming of the api exported from react.tsx (sync) vs server.tsx (async) #2063

Open
chrisSpotlight opened this issue Feb 25, 2025 · 0 comments
Labels
🌟 enhancement New feature or request

Comments

@chrisSpotlight
Copy link

Is your feature request related to a problem? Please describe.

I'm frustrated when I'm using intellisense to import either iteration of the api object for use with trpc. If you're not paying attention to the import path, you only find out when you start chaining properties whether or not you've imported the correct one. Plus, the file names aren't exactly clear either. One is exported from react.tsx and the other from server.tsx. The server one is pretty straightforward, but React runs on client and server so it's not immediately obvious which one you want to import.

To which an argument could be "just pay attention you cretin". But the whole point of this stack is supposed to be the seamless integrations between tools and convenience/ease of use. This is an inconvenience.

Describe the solution you'd like to see

Rename to something like:

  • apiAsync and apiSync
  • serverSideApi and clientSideApi

Bonus benefit: helps with understanding the server vs client dichotomy of Next.

Describe alternate solutions

Big red warnings and banners in the docs?

Additional information

No response

@chrisSpotlight chrisSpotlight added the 🌟 enhancement New feature or request label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant