Skip to content

fix(react-query-persist-client): remove unnecessary props spreading #8778

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

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export type PersistQueryClientProviderProps = QueryClientProviderProps & {
}

export const PersistQueryClientProvider = ({
client,
children,
persistOptions,
onSuccess,
Expand All @@ -32,7 +31,7 @@ export const PersistQueryClientProvider = ({
React.useEffect(() => {
const options = {
...refs.current.persistOptions,
queryClient: client,
queryClient: props.client,
}
if (!didRestore.current) {
didRestore.current = true
Expand All @@ -45,10 +44,10 @@ export const PersistQueryClientProvider = ({
})
}
return isRestoring ? undefined : persistQueryClientSubscribe(options)
}, [client, isRestoring])
}, [props.client, isRestoring])

return (
<QueryClientProvider client={client} {...props}>
<QueryClientProvider {...props}>
<IsRestoringProvider value={isRestoring}>{children}</IsRestoringProvider>
</QueryClientProvider>
)
Expand Down
Loading