Core idea
A dapp does not hold the user’s wallet. It asks the wallet for permission, then asks it to sign or send specific requests.
Your React app is the screen. The wallet is the signer. The blockchain is the source of truth.
The three parts
A wallet dapp has three moving parts. Your React UI shows buttons, data, loading states, and errors. Wagmi gives React hooks for Ethereum work. Viem handles Ethereum requests and data under the hood.
TanStack Query manages async state and caching. Since current Wagmi setup uses it directly, you should think in states: idle, loading, success, error, pending transaction, confirmed.