WagmiProvider and QueryClientProvider setup for React. Use when configuring the React context for wallet and blockchain data.
Scanned 9/10/2026
Install to Claude Code
npx -y skills add cyotee/indexedex --skill wagmi-react-providers --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Wagmi React Providers?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/cyotee-wagmi-react-providers-indexedex)More formats (shields.io, HTML) on the badges page.
---
name: wagmi-react-providers
description: WagmiProvider and QueryClientProvider setup for React. Use when configuring the React context for wallet and blockchain data.
---
# Wagmi-React Providers
Setup providers for React apps.
## Basic Setup
```typescript
import { WagmiProvider } from 'wagmi'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { config } from './config'
const queryClient = new QueryClient()
function App() {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<YourApp />
</QueryClientProvider>
</WagmiProvider>
)
}
```
## WagmiProvider Options
```typescript
<WagmiProvider
config={config}
reconnect={true} // auto-reconnect on mount
>
```
## QueryClient Options
```typescript
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5 minutes
refetchOnWindowFocus: false,
},
},
})
```
## With Initial State (SSR)
```typescript
import { cookieToInitialState } from 'wagmi'
const initialState = cookieToInitialState(config, cookies)
function App() {
return (
<WagmiProvider config={config} initialState={initialState}>
<QueryClientProvider client={queryClient}>
<YourApp />
</QueryClientProvider>
</WagmiProvider>
)
}
```
## useConfig Hook
Access config from anywhere:
```typescript
import { useConfig } from 'wagmi'
function MyComponent() {
const config = useConfig()
// Access chains, connectors, etc.
const chains = config.chains
}
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!