From 1c959e35d297669c41c37d800dcea3d30f394bb5 Mon Sep 17 00:00:00 2001 From: Arseniy Ivanov <138289+freeatnet@users.noreply.github.com> Date: Wed, 19 Jun 2024 01:30:35 -0600 Subject: [PATCH] fix unstable `QueryClient` and configs in React "Getting Started" guide --- docs/pages/react/getting-started.mdx | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/pages/react/getting-started.mdx b/docs/pages/react/getting-started.mdx index e76c1b5..b241712 100644 --- a/docs/pages/react/getting-started.mdx +++ b/docs/pages/react/getting-started.mdx @@ -36,27 +36,27 @@ import { WagmiProvider, createConfig, http } from "wagmi" import { sepolia, arbitrum } from "wagmi/chains" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" -export default function Providers({ children }: { children: React.ReactNode }) { - const wagmiConfig = createConfig({ - chains: [arbitrum, sepolia], - transports: { - [arbitrum.id]: http(), - [sepolia.id]: http(), - }, - }) - const zdConfig = createZdConfig({ - chains: [arbitrum, sepolia], - transports: { - [arbitrum.id]: http(), - [sepolia.id]: http(), - }, - projectIds: { - [arbitrum.id]: ZERODEV_ARB_PROJECT_ID, - [sepolia.id]: ZERODEV_SEPOLIA_PROJECT_ID - } - }) - const queryClient = new QueryClient() +const wagmiConfig = createConfig({ + chains: [arbitrum, sepolia], + transports: { + [arbitrum.id]: http(), + [sepolia.id]: http(), + }, +}) +const zdConfig = createZdConfig({ + chains: [arbitrum, sepolia], + transports: { + [arbitrum.id]: http(), + [sepolia.id]: http(), + }, + projectIds: { + [arbitrum.id]: ZERODEV_ARB_PROJECT_ID, + [sepolia.id]: ZERODEV_SEPOLIA_PROJECT_ID + } +}) +const queryClient = new QueryClient() +export default function Providers({ children }: { children: React.ReactNode }) { return ( @@ -71,4 +71,4 @@ export default function Providers({ children }: { children: React.ReactNode }) { ## Next Steps -The best way to learn how to use `@zerodev/waas` is by looking at [the examples](https://github.com/zerodevapp/waas-examples) and browsing the hooks on the sidebar. \ No newline at end of file +The best way to learn how to use `@zerodev/waas` is by looking at [the examples](https://github.com/zerodevapp/waas-examples) and browsing the hooks on the sidebar.