useAddress

Get the address of the connected wallet.

Returns undefined if no wallet is connected.

Example

import { useAddress } from "@thirdweb-dev/react";
function Example() {
const address = useAddress();
return <div>{address}</div>;
}
function useAddress(): string | undefined;

Returns

let returnType: string | undefined;