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

feat!: Use query option pattern and support useSuspense #263

Conversation

rajzik
Copy link
Contributor

@rajzik rajzik commented Nov 21, 2024

Migrate to query option pattern.

This is a breaking change:

  • the {namespace}Context needs to be updated!
  • react-query@5 is required (useSuspense support)

Ref

https://tkdodo.eu/blog/the-query-options-api

@rajzik rajzik changed the title Breaking change: Only support react query 5, change structure of rq components and use typesafe queryOptions change structure of rq components Nov 21, 2024
@fabien0102
Copy link
Owner

This is actually very cool, let’s try to make this merged!

@rajzik rajzik force-pushed the breaking-change-add-multiple-changes-to-react-query branch from 4925fa7 to 26ede5b Compare January 21, 2025 13:11
@rajzik
Copy link
Contributor Author

rajzik commented Jan 24, 2025

@fabien0102 rebased and ready for review

@@ -22,10 +22,6 @@ export const getContext = (prefix: string, componentsFile: string) =>
*/
enabled?: boolean;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to adjust the type of the enabled param, after some manual integration test with the github example I got this type error:

image

Note to myself: some love is needed for the integration test, it’s a bit painful to setup right now

@fabien0102 fabien0102 changed the title change structure of rq components feat!: Use query option pattern and support useSuspense Jan 30, 2025
Copy link
Owner

@fabien0102 fabien0102 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I did update the context template to fit the new types requirement. Let’s ship this!

@fabien0102 fabien0102 merged commit b97044f into fabien0102:main Jan 30, 2025
1 check passed
@github-actions github-actions bot mentioned this pull request Jan 22, 2025
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.

2 participants