-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-persist-client): remove unnecessary props spreading #8778
base: main
Are you sure you want to change the base?
fix(react-query-persist-client): remove unnecessary props spreading #8778
Conversation
manudeli
commented
Mar 8, 2025

View your CI Pipeline Execution ↗ for commit bff41bd.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8778 +/- ##
============================================
+ Coverage 46.50% 100.00% +53.49%
============================================
Files 199 1 -198
Lines 7560 17 -7543
Branches 1740 2 -1738
============================================
- Hits 3516 17 -3499
+ Misses 3668 0 -3668
+ Partials 376 0 -376
🚀 New features to boost your workflow:
|
…sary-spread-operator
@@ -48,7 +47,7 @@ export const PersistQueryClientProvider = ({ | |||
}, [client, isRestoring]) | |||
|
|||
return ( | |||
<QueryClientProvider client={client} {...props}> | |||
<QueryClientProvider client={client}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The better fix would be to not destruct client
, use props.client
everywhere, then do <QueryClientProvider {...props}>
here.
The idea is that if we add a new prop to QueryClientProvider
, it will also work here. That’s why the PersistQueryClientProviderProps
build on top of QueryClientProviderProps
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I agree, I reflected your review in bef7878
…sary-spread-operator
…sary-spread-operator