-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(react-query): allow passing options to useQuery without initialData #3873
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
fix(react-query): allow passing options to useQuery without initialData #3873
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1d3b9ec:
|
Codecov Report
@@ Coverage Diff @@
## main #3873 +/- ##
==========================================
+ Coverage 96.36% 96.77% +0.41%
==========================================
Files 45 57 +12
Lines 2281 2668 +387
Branches 640 784 +144
==========================================
+ Hits 2198 2582 +384
- Misses 80 84 +4
+ Partials 3 2 -1 Continue to review full report at Codecov.
|
On
react-query
v3, users were allowed to pass custom options touseQuery
anduseInfiniteQuery
without needing of passinginitialData
.With the launch of
react-query
v4, this is not possible anymore as all the overload functions ofuseQuery
forces the user to passinitialData
:So, this Pull Request adds a new overload function which allow users to pass options without forcing them to pass
initialData
(as it was on v3).