-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
feat: use tRPC's new tanstack react query integration instead of the classic integration #2119
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…classic integration
1b92b9e
to
701d4e0
Compare
Why do you need the legacy intergration? |
@Icestonks we don't, this PR is still in progress, hence the "draft" |
@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. |
@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 :) |
@bohdancho ah makes sense, nw! |
…classic integration (#2065)Closes #
✅ Checklist
Changelog
[Short description of what has changed]
Screenshots
[Screenshots]
💯
…classic integration (#2065)