Why I Use Wagmi for Every New Web3 React Project
Three years ago I wrote wallet integrations with Ethers.js directly. Today I use Wagmi for almost everything. Here's why — and the one case where I don't.
What Wagmi actually is
Wagmi is a collection of React hooks built on top of Viem, a TypeScript Ethereum library. It handles the parts of Web3 development that are tedious to build yourself: wallet connections, chain management, contract interactions, and transaction lifecycle tracking.
The problem with raw Ethers.js
Ethers.js is excellent — but it's a library, not a React framework. Using it directly means writing a lot of useEffect and useState boilerplate to manage wallet state, handle disconnections, and surface transaction status. You're building your own state management layer for blockchain interactions — work that doesn't need to exist.
What you get with Wagmi
Every common Web3 action becomes a hook. Connecting is useConnect. Reading a balance is useBalance. Writing to a contract is useWriteContract. Tracking a transaction is useWaitForTransactionReceipt. Each hook surfaces loading, error, and success states natively, and they compose cleanly.
Where Wagmi wins most
Multi-wallet support is Wagmi's biggest practical advantage. Supporting MetaMask, Coinbase, WalletConnect, and hardware wallets in raw Ethers.js means maintaining adapter code. In Wagmi you pass connectors to your config and it handles everything.
The React Query integration is a genuine time-saver too. On-chain data reads are cached, de-duplicated, and refetched on a schedule without any cache logic on your end.
When to skip Wagmi
If you're building a Node.js backend that interacts with contracts, use Viem directly. If you need very low-level control over transaction signing, the abstraction may work against you. For React frontends, Wagmi is the right call almost every time.
Want to work together? I build Web3 dashboards and DeFi interfaces.