Comparison To Other Libraries
There are a few different options of React libraries for Ethereum that help manage wallet connections, provide utility methods/hooks, etc.
👀
If you have any thoughts about this section or want to add another comparison, please contribute! The goal is for these comparisons to be unbiased and informative.
wagmi
Pros
- Hooks for connecting wallets, signing messages, sending transactions, etc.
- Auto-refresh on wallet and network changes
- TypeScript ready
- Zero-dependencies (besides ethers.js peer dependency)
- Test suite and documentation
- MIT License
Cons
- Not as many connectors as
web3-react
web3-react
Pros
- Supports many different connectors (conceptually similar to wagmi's connectors)
- Used by Uniswap, Foundation
Cons
- Need to set up connectors and method for connecting wallet on your own
- Need to install connectors separately
- No hooks for interacting with Ethereum, fetching information, etc.
- Almost no tests or documentation; infrequent updates
- GPL-3.0 License
useDApp
Pros
- Auto-refresh on new blocks and wallet changes
- Multicall support
- Transaction notifications
- Chrome extension and Firefox add-on
- MIT License
Cons
- Uses
web3-react
- Non-standard hook API
- Lack of TypeScript generics support
- Almost no tests
web3modal
Pros
- UI component for connecting wallet
- MIT License
Cons
- Cannot be used headlessly
- No hooks for interacting with Ethereum, fetching information, etc.
- Almost no tests and infrequent updates