react-use-etherscan
🌊 🏄 ⚛️ React hooks for interacting with Etherscan. Supports Android/iOS/Web/Expo. This is a lifecycle-aware wrapper around etherscan-api.
Migration Notes
- When migrating from versions <
0.1.0-alpha.0
, using arrays to return information has been replaced with hooks, i.e.[loading, data, error]
becomes{ loading, data, error, refetch }
.
🚀 Getting Started
Using yarn
:
yarn add react-use-etherscan
🌱 Example
;; { const loading result error = ; console; return null;} { const loading result error = ; console; return null;} { const api: stats = ; ; return null;} { const address = ; return <EtherscanProvider apiKey="your-api-key" network="rinkeby" > <BalanceOf address=address /> <EthPrice /> <TransactionList address=address /> </EtherscanProvider> ;}