Skip to content
Back to skills

Wagmi React Providers

ASecurity

WagmiProvider and QueryClientProvider setup for React. Use when configuring the React context for wallet and blockchain data.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 10, 2026
developmenttypescriptreact

Works with

  • cli

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add cyotee/indexedex --skill wagmi-react-providers --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Wagmi React Providers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyotee-wagmi-react-providers/badge)](https://www.skillsdirectory.com/skills/cyotee-wagmi-react-providers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…