TheSoftwareHouse / react-starter-boilerplate

A highly scalable React SPA boilerplate focused on performance and best practices, written in TypeScript.
https://tsh.io/
MIT License
62 stars 19 forks source link

feat: update react query to V5 #176

Closed MieszkoTSH closed 3 months ago

MieszkoTSH commented 5 months ago

Update react query to v5 Change use query abstraction to allow more granular cache management query factory was based on this article https://tkdodo.eu/blog/the-query-options-api. Since we use dependency injection to inject client I was not able to use react query built in queryOptions and infiniteQueryOptions util functions. Functions queryFactoryOptions infiniteQueryFactoryOptions are created for typesafety purposes only. They are more limited then the ones from the article (https://tkdodo.eu/blog/the-query-options-api#datatag - they won't infer proper types in e.g queryClient.getQueryData)

changeset-bot[bot] commented 5 months ago

⚠️ No Changeset found

Latest commit: 9fb6bae3f23bbf80879d5765077754ff42e30cfd

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

socket-security[bot] commented 5 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@tanstack/react-query-devtools@5.45.1 environment +1 3.44 MB tannerlinsley
npm/@tanstack/react-query@5.45.1 environment +1 3.05 MB tannerlinsley

🚮 Removed packages: npm/@tanstack/react-query-devtools@4.35.0, npm/@tanstack/react-query@4.36.1

View full report↗︎