Skip to content
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

Make v9 support react-query 4? #2243

Closed
1 of 5 tasks
KATT opened this issue Jul 18, 2022 · 10 comments · Fixed by #2240
Closed
1 of 5 tasks

Make v9 support react-query 4? #2243

KATT opened this issue Jul 18, 2022 · 10 comments · Fixed by #2240
Labels

Comments

@KATT
Copy link
Member

KATT commented Jul 18, 2022

  • react-query@4 is getting released and currently, tRPC doesn't support it. People will be flooding our help channel on Discord soon with issues related to this.
  • I don't want us to have pressure to release v10, so I think we should make a minor 9.x-version that has peerDependency of react-query ^4.0.0-.....
  • Unsure if we can support both anymore, so we should just say that "after version 9.X.X you have to be on react-query 4"

Partly in progress by @dyaa over in #2240

Things to be done

First release

Second release (still on v9.x.x tree!)

  • Do something about colliding key context which react-query is introducing?
  • Make it work with react-query 4
  • Bump peer dependency
  • Add warning on some of the React-parts of website
@KATT KATT added 🙋‍♂️ help wanted Extra attention is needed @trpc/react labels Jul 18, 2022
@dyaa
Copy link
Contributor

dyaa commented Jul 18, 2022

I'm in favor of releasing react-query@4 after it's being released within the upcoming v10 without pressure where we can address issues of context and other enhancements, wdyt?

@martin-fv
Copy link

Is there any info about when react-query releases v4 and how soon will tRPC v10 be realeased?

@mmkal
Copy link
Collaborator

mmkal commented Jul 18, 2022

Does v10 have to be called "v10"? Could we just support react-query v4 in a smallish breaking change (not working with v3 anymore is very much a breaking change), call that trpc v10 and call the big-architecture-change-project "v11" (or just "vnext" if we don't want to keep assigning and reassigning integers to it before it's ready)?

@KATT
Copy link
Member Author

KATT commented Jul 18, 2022

To be clear - I'm suggesting a breaking change on v9.x. for this.

@jlalmes
Copy link
Contributor

jlalmes commented Jul 18, 2022

I don't like the idea of breaking changes in non-major versions. I also can't see any fundamental reason to need to support react-query@4 in v9. Should we just support react-query@4 in v10, and leave react-query@3 behind in v9?

v10 is stable(-ish) so if someone is super keen to use react-query@4 just ask them to upgrade tRPC too.

@KATT KATT changed the title Make v9 support react-query 4 Make v9 support react-query 4? Jul 18, 2022
@KATT KATT added 📚 documentation / examples Improvements or additions to documentation 💬 discussion and removed 📚 documentation / examples Improvements or additions to documentation labels Jul 18, 2022
@dyaa
Copy link
Contributor

dyaa commented Jul 18, 2022

Adding to @jlalmes and related to

Do something about colliding key context which react-query is introducing?

It looks like there're more breaking changes when it comes to TRPCRequestOptions's context, where we might have to change our property context

@mmkal
Copy link
Collaborator

mmkal commented Jul 18, 2022

I don't like the idea of breaking changes in non-major versions. I also can't see any fundamental reason to need to support react-query@4 in v9. Should we just support react-query@4 in v10, and leave react-query@3 behind in v9?

v10 is stable(-ish) so if someone is super keen to use react-query@4 just ask them to upgrade tRPC too.

I agree with the first part but stable-ish is pretty different from stable! With discussions like #2131 still open I think it would be a bad idea to suggest anyone move to v10 in production just yet. We should see which is ready first, react-query v4 or trpc vnext. If react-query v4 is ready soon, and trpc vnext turns into The Winds of Winter - I still don't see why we shouldn't bump to v10 with what's currently on main, and start calling the next branch "the next branch" instead of "v10". It seems likely react-query v4 will be out of beta first, because beta > alpha.

@martin-fv
Copy link

FYI, react-query just renamed their package to https://www.npmjs.com/package/@tanstack/react-query with an initial version 4.0.5

@dyaa dyaa linked a pull request Aug 8, 2022 that will close this issue
@KATT
Copy link
Member Author

KATT commented Aug 8, 2022

We've decided not to support react-query 4 for v9 because of the breaking changes it involves.

@KATT KATT closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2022
@github-actions
Copy link

github-actions bot commented Oct 4, 2022

This issue has been locked because it had no new activity for 14 days. If you are running into a similar issue, please create a new issue. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants