Function useAddress

  • Hook for accessing the address of the connected wallet

    import { useAddress } from "@thirdweb-dev/react"
    

    Returns string | undefined

    Example

    To get the address of the connected wallet, you can use the hook as follows:

    import { useAddress } from "@thirdweb-dev/react"

    const App = () => {
    const address = useAddress()

    return <div>{address}</div>
    }

    The address variable will hold the address of the connected wallet if a user has connected using one of the supported wallet connection hooks.

    See

    Documentation

Generated using TypeDoc