Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

fix: avoid placeholderData option in queryClient #1078

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions app/react-query.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@ export const queryClient = new QueryClient({
}),
})

queryClient.setDefaultOptions({
queries: {
/* Avoids problems in simulation and build queries when the user navigates away from the page while waiting for a tx confirmation.
Without this option, navigating to another tab and coming back was causing useRemoveLiquidityBuildCallDataQuery to be undefined leading to unexpected thrown errors.
This is equivalent to setting the old keepPreviousData: true option
More info:
https://github.com/TanStack/query/discussions/6460
*/
placeholderData: (prev: any) => prev,
},
})

export function ReactQueryClientProvider({ children }: { children: ReactNode | ReactNode[] }) {
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
"tinycolor2": "^1.6.0",
"use-debounce": "^10.0.0",
"use-sound": "^4.0.1",
"usehooks-ts": "^2.9.2",
"viem": "^2.19.3",
"wagmi": "^2.12.5"
"usehooks-ts": "^3.1.0",
"viem": "^2.21.6",
"wagmi": "^2.12.11"
},
"devDependencies": {
"@apollo/experimental-nextjs-app-support": "^0.8.0",
Expand Down
Loading
Loading