Skip to content

useConnectors

Hook for getting configured connectors.

Import

ts
import { useConnectors } from 'wagmi'
import { useConnectors } from 'wagmi'

Usage

tsx
import { useConnectors } from 'wagmi'

function App() {
  const connectors = useConnectors()
}
import { useConnectors } from 'wagmi'

function App() {
  const connectors = useConnectors()
}
ts
import { http, createConfig } from 'wagmi'
import { mainnet, sepolia } from 'wagmi/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})
import { http, createConfig } from 'wagmi'
import { mainnet, sepolia } from 'wagmi/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})

Return Type

ts
import { type UseConnectorsReturnType } from 'wagmi'
import { type UseConnectorsReturnType } from 'wagmi'

readonly Connector[]

Connectors from config.connectors.

Action

Released under the MIT License.