feat: Support RSC & App Layouts
## Describe the feature you'd like to request We should make official support for Next 13 app layouts & RSC. ## Describe the solution you'd like to see Being able to transparently use tRPC identically in RSC-components and in `"use client"`-components. This is very open-ended and hard to answer without tonnes of exploration. We've done some in [https://github.com/trpc/next-13](https://github.com/trpc/next-13) and experiments of new Next.js adapters in [https://github.com/trpc/examples-next-app-dir](https://github.com/trpc/examples-next-app-dir) ## Rough outline / sketches Leverage "forked" versions of the tRPC client outlined by @sebmarkbage in [this tweet](https://twitter.com/sebmarkbage/status/1586107886765211649). ### Folder structure ``` . ├── pages │ └── api │ └── [trpc].ts └── trpc ├── index.ts # entrypoint for TS to be happy. Actually not used, `package.json` will magically route to `/entrypoints` ├── package.json ├── context.ts ├── entrypoints │ ├── client.ts # <-- this is what gets magically imported when importing `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/trpc` on the client │ └── rsc.ts # <-- gets imported when importing `~~~~~~~~~~~~~~~~~~~~~~~~~~
Posted by KATT on Nov 27, 2022, 4:10 PM
Tags
Related issues
- Some good points here, and I definitely hate the "unalive" movement but like someone else said, it has gone beyond self-censorship to in-...
- It’s hard to take the article seriously when there’s no real discussion about how consciousness is defined and it takes Anthropic’s views...
- you know what i hate?
- > I honestly do not understand why any average person would buy anything else than a macbook today.
- Codex App frequently freezes/stutters on Windows 11 Pro despite sufficient system resources
- Add "Basic" and "Standard" plans
Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments
ux (SaaS)
Some good points here, and I definitely hate the "unalive" movement but like someone else said, it has gone beyond self-censorship to in-...
It’s hard to take the article seriously when there’s no real discussion about how consciousness is defined and it takes Anthropic’s views...
you know what i hate?
> I honestly do not understand why any average person would buy anything else than a macbook today.
Codex App frequently freezes/stutters on Windows 11 Pro despite sufficient system resources
Add "Basic" and "Standard" plans
FEATURE: Multi-window support in Claude Code Desktop
Hi HN I built CookPal to solve a small but annoying problem for myself: I kept saving recipes from websites, TikTok, YouTube, and Instag...
feat: Support RSC & App Layouts
## Describe the feature you'd like to request We should make official support for Next 13 app layouts & RSC. ## Describe the solution you'd like to see Being able to transparently use tRPC identically in RSC-components and in `"use client"`-components. This is very open-ended and hard to answer without tonnes of exploration. We've done some in [https://github.com/trpc/next-13](https://github.com/trpc/next-13) and experiments of new Next.js adapters in [https://github.com/trpc/examples-next-app-dir](https://github.com/trpc/examples-next-app-dir) ## Rough outline / sketches Leverage "forked" versions of the tRPC client outlined by @sebmarkbage in [this tweet](https://twitter.com/sebmarkbage/status/1586107886765211649). ### Folder structure ``` . ├── pages │ └── api │ └── [trpc].ts └── trpc ├── index.ts # entrypoint for TS to be happy. Actually not used, `package.json` will magically route to `/entrypoints` ├── package.json ├── context.ts ├── entrypoints │ ├── client.ts # <-- this is what gets magically imported when importing `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/trpc` on the client │ └── rsc.ts # <-- gets imported when importing `~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments (0)
No comments yet. Start the discussion.