Skip to content

docs: Nextjs app router improvements #6138

Closed

Description

@joshuajaco

Area of Improvement

The docs are still incredibly unclear on how to use tRPC with the nextjs app router, and there are no examples either.
There are some related issues (#5936, #5277), but I still don't understand the integration at all.

It also mentions react-query all over the place, but what if I don't want to use react-query?

I used tRPC a couple of years ago in a Nextjs pages router app and the setup was easy and simple, coming back now I don't understand anything anymore.

Link to related docs

https://trpc.io/docs/client/react/server-components

Activity

  1. added
    📚 documentation / examples
    on Oct 18, 2024
  2. KATT commented on Oct 20, 2024

    @KATT
    Member
  3. terrierscript commented on Oct 31, 2024

    @terrierscript

    Finding the page below allowed me to do what I wanted.
    https://trpc.io/docs/server/adapters/nextjs#route-handlers
    This page proved to be the most beneficial for trying out the migration from the Pages router.

    It might be helpful to include a link to it on the setup page to avoid any confusion

  4. jblevins1991 commented on May 17, 2025

    @jblevins1991

    I think the reason this is unclear is because there isn't solid documentation explaining the integration points for each part of the integration. Take the following components of your typical tRPC implementation.

    • handler creator (when to use nextjs adapter handler fn vs fetch adapter handler fn) (pages vs app router)
    • fetching method (react-query, etc) (creating the client side and server side fetcher for rsc vs standard ssr)
    • authorization integration (would be cool to see how some of these integrate)
  5. KATT commented on Nov 2, 2026

    @KATT
    Member
  6. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.

  7. locked as resolved and limited conversation to collaborators on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    📚 documentation / examples

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions