Skip to content

docs: update setup.mdx - #7445

Closed
ambir513 wants to merge 1 commit into
trpc:mainfrom
ambir513:main
Closed

ambir513 wants to merge 1 commit into
trpc:mainfrom
ambir513:main

Conversation

@ambir513

@ambir513 ambir513 commented Jul 23, 2026 •

Copy link
Copy Markdown

Closes #

🎯 Changes

This is a documentation update.

  • Updated setup.mdx.
  • Added a clarification comment to line 172 to improve the documentation.
  • No functional code changes.

βœ… Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

Summary by CodeRabbit

  • Documentation
    • Updated the Next.js App Router setup guide to remove the unused superjson import from the example configuration.

add a comment on line no 172
@ambir513
ambir513 requested a review from a team as a code owner July 23, 2026 16:13
@vercel

vercel Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
next-prisma-starter Ready Ready Preview Jul 23, 2026 4:14pm
og-image Ready Ready Preview, Comment Jul 23, 2026 4:14pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

πŸ“ Walkthrough

Walkthrough

The Next.js App Router setup documentation comments out the superjson import while leaving the query client factory unchanged.

Changes

Next.js documentation

Layer / File(s) Summary
Setup snippet import update
www/docs/client/nextjs/app-router/setup.mdx
Comments out the active superjson import and preserves the remaining makeQueryClient() example.

Estimated code review effort: 1 (Trivial) | ~2 minutes

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
Title check βœ… Passed The title clearly identifies the documentation update in setup.mdx.
Description check βœ… Passed The description follows the required template and explains the documentation change and test status.
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/@trpc/client@7445

@trpc/next

npm i https://pkg.pr.new/@trpc/next@7445

@trpc/openapi

npm i https://pkg.pr.new/@trpc/openapi@7445

@trpc/react-query

npm i https://pkg.pr.new/@trpc/react-query@7445

@trpc/server

npm i https://pkg.pr.new/@trpc/server@7445

@trpc/tanstack-react-query

npm i https://pkg.pr.new/@trpc/tanstack-react-query@7445

@trpc/upgrade

npm i https://pkg.pr.new/@trpc/upgrade@7445

commit: 8114eaf

Nick-Lucas pushed a commit that referenced this pull request Jul 26, 2026
## 🎯 Changes

Fixes a CI-only failure of `transforms.test.ts > hooks
optimistic-update.tsx`: `Expected "Posts: 1initial", Received "Posts:
2initialFoo"` **at the initial-render assertion** β€” reproducible on
unrelated PRs (the docs-only #7445, and #7447), always with `retry x2`
all failing the same way.

Two leaks between spec runs (the spec executes twice per test β€” input
component and transformed snapshot β€” and again on CI retries), both via
module-scoped state:

1. **In-flight mutation re-populates the server after reset.** The
fixture's update is optimistic, so a spec run finishes (or fails) with
the `create` mutation still in flight. `resetFixtureState()` truncates
`posts`, then the late mutation settles and pushes `'Foo'` back β€” the
next run's (or retry's) initial fetch returns `2initialFoo` for its
whole `waitFor` window. Under CI load the settle reliably lands in that
gap; on a fast local machine (where `retry` is 0 anyway) it practically
never does, which is why this only ever failed in CI. The spec's
disposer is now async (`makeAsyncResource` + `await using`) and waits
for `queryClient.isMutating() === 0` before resetting.

2. **The shared `QueryClient` cache outlives a run.** `renderApp` now
clears it before mounting, so a retry can't render the previous
attempt's cached data. This covers all nine fixtures using the harness;
no spec renders more than once per run, so nothing relied on cache
persistence.

## βœ… Checklist

- [x] I have followed the steps listed in the [Contributing
guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md).
- [ ] If necessary, I have added documentation related to the changes
made.
- [x] I have added or updated the tests related to the changes made.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Improved test isolation by resetting the app’s data cache before each
render, preventing prior render or retry state from leaking into later
tests.
* Enhanced optimistic-update test cleanup by waiting for all in-flight
mutations to fully complete before resetting fixture state and
unmounting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@Nick-Lucas Nick-Lucas closed this Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 13, 2026

This branch was successfully deployed

5 active deployments
Preview – www β€” 8114eaff Deployed Jul 23, 2026 by vercel[bot]
Preview – examples-todomvc β€” 8114eaff Deployed Jul 23, 2026 by vercel[bot]
Preview – og-image β€” 8114eaff Deployed Jul 23, 2026 by vercel[bot]
Preview – trpc-next-app-dir β€” 8114eaff Deployed Jul 23, 2026 by vercel[bot]
Preview – next-prisma-starter β€” 8114eaff Deployed Jul 23, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants