Skip to content

Commit

Permalink
chore: show QueryClientProvider import and queryclient instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
karancoder committed Dec 3, 2024
1 parent f19689a commit 81d774c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ pnpm add @cosmjs/cosmwasm-stargate @cosmjs/launchpad @cosmjs/proto-signing @cosm
Wrap your React app with `<QueryClientProvider />` and `<GrazProvider />`, and use available `graz` hooks anywhere:

```jsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";

const queryClient = new QueryClient();

const cosmoshub: ChainInfo = {
chainId: "cosmoshub-4",
chainName: "Cosmos Hub",
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ pnpm add @cosmjs/cosmwasm-stargate @cosmjs/launchpad @cosmjs/proto-signing @cosm
Wrap your React app with `<QueryClientProvider />` and `<GrazProvider />`, and use available `graz` hooks anywhere:

```tsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider } from "graz";

const queryClient = new QueryClient();

const cosmoshub: ChainInfo = {
chainId: "cosmoshub-4",
chainName: "Cosmos Hub",
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/provider/grazProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ Graz uses `@tanstack/react-query`'s features under the hood, hence you need to w
#### Usage

```tsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { GrazProvider, WalletType } from "graz";

const queryClient = new QueryClient();

const cosmoshub = {
chainId: "cosmoshub-4",
chainName: "Cosmos Hub",
Expand Down

0 comments on commit 81d774c

Please sign in to comment.