Skip to content

feat: use tRPC's new tanstack react query integration instead of the classic integration #2119

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bohdancho
Copy link

…classic integration (#2065)Closes #

✅ Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

Changelog

[Short description of what has changed]


Screenshots

[Screenshots]

💯
…classic integration (#2065)

Copy link

changeset-bot bot commented May 7, 2025

⚠️ No Changeset found

Latest commit: 701d4e0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
create-t3-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2025 7:18pm

@Icestonks
Copy link

Why do you need the legacy intergration?

@bohdancho
Copy link
Author

@Icestonks we don't, this PR is still in progress, hence the "draft"

@mmstroik
Copy link
Contributor

@bohdancho I think they were asking because you have a comment that says the legacy integration's createHydrationHelpers are necessary until this get's resolved, and I'm not sure how that SSR discussoin has any bearing on whether or not the legacy client is needed (+ seems that prefetching in a RSC bypasses that issue), and u can always create a HydrateClient helper similar to how it is done here).

But totally get that its just a draft -- I'm mainly just genuinely asking cuz I'm curious and there is a good chance I'm just confused about something.

@bohdancho
Copy link
Author

bohdancho commented May 20, 2025

@mmstroik oh, I see, sorry!

I believed these hydration helpers' primary use is to work around this issue: [Allow Client Components access to request headers during SSR] (vercel/next.js#60640) (it's the one you linked). Now that I think about it, they are still necessary if you want to to render as you fetch (prefetch in root, use in a child component).

The reason I wrote in the comment that we need the legacy package until that issue is resolved is because the new integration's package doesn't export the helpers the way the legacy one did, so I erroneously assumed there was no way to use them (that's when I wrote the comment). After that I checked the docs and learned that you just have to create the helpers in a different way. So we do indeed not need the legacy package :)

@mmstroik
Copy link
Contributor

@bohdancho ah makes sense, nw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants