Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 554 Bytes

useBalance.md

File metadata and controls

23 lines (17 loc) · 554 Bytes

useBalance

Returns the account balance for the current chain.

Usage

import { useBalance } from '@nazeeh2000/comp-kit'

const Comp = () => {
 const { balance, fetching, error, etherBalance } = useBalance({
    address,
    // all the other parameters you can pass to `getBalance` from viem
    // example: blockTag: 'latest'
  });

  return (
  // Your component
  )
}

Note: You can pass all the parameters from getBalance hook of viem to the above useBalance hook.